[Mesa-dev] [PATCH 08/23] glsl/glcpp: Minor tweak to wording of error message
Carl Worth
cworth at cworth.org
Thu Jun 26 15:19:08 PDT 2014
It makes more sense to print the directive name with the preceding '#'.
---
src/glsl/glcpp/glcpp-parse.y | 2 +-
src/glsl/glcpp/tests/077-else-without-if.c.expected | 2 +-
src/glsl/glcpp/tests/078-elif-without-if.c.expected | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 96d3949..643c472 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -2118,7 +2118,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 cc1c379..64e6d1a 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 ee34501..f3530ed 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
--
2.0.0
More information about the mesa-dev
mailing list