summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/glcpp-parse.y
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2010-08-11 14:09:11 -0700
committerCarl Worth <[email protected]>2010-08-11 14:38:04 -0700
commitda6b10a7eb26c8a13056cbae9015d5b84f134142 (patch)
tree2adc19dd4d0ef9bb901a191a001d077c8d9b4765 /src/glsl/glcpp/glcpp-parse.y
parent6b9e7b034ca5d10cd367a2388c5439cdb10a1a68 (diff)
glcpp: Fix "unterminated if" diagnostic.
This was previously being appended to the output string *after* a copy of the supposedly final string was made and handed to the caller. So the diagnostic was never actually visible to the user. We fix this by moving the check for an unterminated #if from glcpp_parser_destroy to the calling function, preprocess. This fixes the test case 083-unterminated-if.c.
Diffstat (limited to 'src/glsl/glcpp/glcpp-parse.y')
-rw-r--r--src/glsl/glcpp/glcpp-parse.y2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 0e0d9d412b6..7b08cd5807c 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -1016,8 +1016,6 @@ glcpp_parser_parse (glcpp_parser_t *parser)
void
glcpp_parser_destroy (glcpp_parser_t *parser)
{
- if (parser->skip_stack)
- glcpp_error (&parser->skip_stack->loc, parser, "Unterminated #if\n");
glcpp_lex_destroy (parser->scanner);
hash_table_dtor (parser->defines);
talloc_free (parser);