From da6b10a7eb26c8a13056cbae9015d5b84f134142 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 11 Aug 2010 14:09:11 -0700 Subject: 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. --- src/glsl/glcpp/glcpp-parse.c | 2 -- 1 file changed, 2 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 fe7549e5c5..df26899a0f 100644 --- a/src/glsl/glcpp/glcpp-parse.c +++ b/src/glsl/glcpp/glcpp-parse.c @@ -3333,8 +3333,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); -- cgit v1.2.3