glcpp: Demote "macro redefined" from an error to a warning
The GLSL specification is vague here, (just says "as is standard for C++"), though the C specifications seem quite clear that this should be an error. However, an existing piglit test (CorrectPreprocess11.frag) expects this to be a warning, not an error, so we change this, and document in README the deviation from the specification.
This commit is contained in:
parent
476db2bd3d
commit
d3df641f0a
4 changed files with 38 additions and 15 deletions
|
|
@ -1687,8 +1687,8 @@ _define_object_macro (glcpp_parser_t *parser,
|
|||
talloc_free (macro);
|
||||
return;
|
||||
}
|
||||
glcpp_error (loc, parser, "Redefinition of macro %s\n",
|
||||
identifier);
|
||||
glcpp_warning (loc, parser, "Redefinition of macro %s\n",
|
||||
identifier);
|
||||
}
|
||||
|
||||
hash_table_insert (parser->defines, macro, identifier);
|
||||
|
|
@ -1718,8 +1718,8 @@ _define_function_macro (glcpp_parser_t *parser,
|
|||
talloc_free (macro);
|
||||
return;
|
||||
}
|
||||
glcpp_error (loc, parser, "Redefinition of macro %s\n",
|
||||
identifier);
|
||||
glcpp_warning (loc, parser, "Redefinition of macro %s\n",
|
||||
identifier);
|
||||
}
|
||||
|
||||
hash_table_insert (parser->defines, macro, identifier);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue