mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
[release-0.4] 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
This commit is contained in:

committed by
James McCoy

parent
49469ec6b9
commit
e1cc8e8e09
@@ -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 {
|
||||
|
Reference in New Issue
Block a user