mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
glcpp: Disallow "defined" as a macro name.
Both GCC and Clang disallow this, and glslang has recently started disallowing it as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94188 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
dfc95ad6d1
commit
1c694a6c20
1 changed files with 3 additions and 0 deletions
|
|
@ -2096,6 +2096,9 @@ _check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc,
|
|||
if (strncmp(identifier, "GL_", 3) == 0) {
|
||||
glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n");
|
||||
}
|
||||
if (strcmp(identifier, "defined") == 0) {
|
||||
glcpp_error (loc, parser, "\"defined\" cannot be used as a macro name");
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue