From: Carl Worth Date: Sat, 21 Jun 2014 02:11:27 +0000 (-0700) Subject: glsl/glcpp: Minor tweak to wording of error message X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0742e0acd302d90dd7f326cf641da61ac60a8508;p=mesa.git glsl/glcpp: Minor tweak to wording of error message It makes more sense to print the directive name with the preceding '#'. Reviewed-by: Jordan Justen --- diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index a93c1e359f4..840003b226e 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -2119,7 +2119,7 @@ _glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc, const char *type, int condition) { if (parser->skip_stack == NULL) { - glcpp_error (loc, parser, "%s without #if\n", type); + glcpp_error (loc, parser, "#%s without #if\n", type); return; } diff --git a/src/glsl/glcpp/tests/077-else-without-if.c.expected b/src/glsl/glcpp/tests/077-else-without-if.c.expected index cc1c379cad3..64e6d1ac93e 100644 --- a/src/glsl/glcpp/tests/077-else-without-if.c.expected +++ b/src/glsl/glcpp/tests/077-else-without-if.c.expected @@ -1,3 +1,3 @@ -0:1(2): preprocessor error: else without #if +0:1(2): preprocessor error: #else without #if diff --git a/src/glsl/glcpp/tests/078-elif-without-if.c.expected b/src/glsl/glcpp/tests/078-elif-without-if.c.expected index ee3450133a2..f3530ed2c07 100644 --- a/src/glsl/glcpp/tests/078-elif-without-if.c.expected +++ b/src/glsl/glcpp/tests/078-elif-without-if.c.expected @@ -1,3 +1,3 @@ -0:1(2): preprocessor error: elif without #if +0:1(2): preprocessor error: #elif without #if