From b87b4a61476bb65e9200bd2ee93b8a98ca4db84e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 17 Feb 2020 17:17:37 +0100 Subject: 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 --- src/nvim/viml/parser/expressions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/viml/parser/expressions.h') 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 { -- cgit