aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2020-02-17 17:17:37 +0100
committerAndreas Schneider <asn@cryptomilk.org>2020-02-23 09:49:33 +0100
commitb87b4a61476bb65e9200bd2ee93b8a98ca4db84e (patch)
tree2a9910c5350ab93a49eb76f7ab3d3ff6ca374b97
parentebcde1de42588e697e0f4eaed9f6f0ea6a77a2cd (diff)
downloadrneovim-b87b4a61476bb65e9200bd2ee93b8a98ca4db84e.tar.gz
rneovim-b87b4a61476bb65e9200bd2ee93b8a98ca4db84e.tar.bz2
rneovim-b87b4a61476bb65e9200bd2ee93b8a98ca4db84e.zip
nvim:viml: Fix enum declaration of ExprParserFlags
Instead of declaring an enum, this creates a global variable. As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. Each time this header is included, we define the enum name as a global variable. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
-rw-r--r--src/nvim/viml/parser/expressions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/viml/parser/expressions.h b/src/nvim/viml/parser/expressions.h
index 23e172da75..838a742271 100644
--- a/src/nvim/viml/parser/expressions.h
+++ b/src/nvim/viml/parser/expressions.h
@@ -326,7 +326,7 @@ struct expr_ast_node {
} data;
};
-enum {
+enum ExprParserFlags {
/// Allow multiple expressions in a row: e.g. for :echo
///
/// Parser will still parse only one of them though.
@@ -345,7 +345,7 @@ enum {
// viml_expressions_parser.c, nvim_parse_expression() flags parsing
// alongside with its documentation and flag sets in check_parsing()
// function in expressions parser functional and unit tests.
-} ExprParserFlags;
+};
/// AST error definition
typedef struct {