glcpp: Reword diagnostic for #elif with no expression
authorCarl Worth <cworth@cworth.org>
Wed, 11 Aug 2010 20:50:51 +0000 (13:50 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 11 Aug 2010 21:38:03 +0000 (14:38 -0700)
Rather than telling the user what to fix, the standard convention is to
describe what the detected problem is. With this change, test
081-elif-without-expression now passes.

src/glsl/glcpp/glcpp-parse.c
src/glsl/glcpp/glcpp-parse.y
src/glsl/glcpp/tests/081-elif-without-expression.c.expected

index 498d018764011aa90d10d9231af15b513c92cdc3..05bb7ca48b5c275eb326f1ea175e56ae056fd752 100644 (file)
@@ -1950,7 +1950,7 @@ yyreduce:
                if (parser->skip_stack &&
                    parser->skip_stack->type == SKIP_TO_ELSE)
                {
-                       glcpp_error(& (yylsp[(1) - (2)]), parser, "#elif needs an expression");
+                       glcpp_error(& (yylsp[(1) - (2)]), parser, "#elif with no expression");
                }
                else
                {
index 643c449d0e17e808de9d388a75445d5b8ca96e5d..795030ecfe758ead5d2bbd540bff50897b013f1f 100644 (file)
@@ -276,7 +276,7 @@ control_line:
                if (parser->skip_stack &&
                    parser->skip_stack->type == SKIP_TO_ELSE)
                {
-                       glcpp_error(& @1, parser, "#elif needs an expression");
+                       glcpp_error(& @1, parser, "#elif with no expression");
                }
                else
                {