aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/glcpp-parse.y
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2010-08-23 11:38:45 -0700
committerCarl Worth <[email protected]>2011-01-28 15:16:36 +1000
commitd3df641f0aba99b0b65ecd4d9b06798bca090a29 (patch)
treed86a67214443202a65f0b986162b68c7a2cb09ff /src/glsl/glcpp/glcpp-parse.y
parent476db2bd3d72440f54ff57c23da05dc1d624fee9 (diff)
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.
Diffstat (limited to 'src/glsl/glcpp/glcpp-parse.y')
-rw-r--r--src/glsl/glcpp/glcpp-parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index b449eb288b8..797e614280b 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -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);