From d3df641f0aba99b0b65ecd4d9b06798bca090a29 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 23 Aug 2010 11:38:45 -0700 Subject: 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. --- src/glsl/glcpp/glcpp-parse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/glsl/glcpp/glcpp-parse.c') diff --git a/src/glsl/glcpp/glcpp-parse.c b/src/glsl/glcpp/glcpp-parse.c index 8567bda1e5..2bf96e035e 100644 --- a/src/glsl/glcpp/glcpp-parse.c +++ b/src/glsl/glcpp/glcpp-parse.c @@ -4012,8 +4012,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); @@ -4043,8 +4043,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); -- cgit v1.2.3