summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-07-09 17:17:58 -0600
committerBrian Paul <[email protected]>2014-07-10 08:08:10 -0600
commitfaa6b0cdc30c327871d7639ca3f1da5057d90d0a (patch)
tree7945e801206327dadcf581077a7c689528eaeca1 /src/glsl
parentacaed8f41d3cf57092f3fe3a607b8069c72b57f1 (diff)
glsl/glcpp: move macro declaration before code to fix MSVC build
Reviewed-by: Carl Worth <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/glcpp/glcpp-parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 21c85b410f5..084078eb01f 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -265,13 +265,14 @@ control_line:
| HASH_UNDEF {
glcpp_parser_resolve_implicit_version(parser);
} IDENTIFIER NEWLINE {
+ macro_t *macro;
if (strcmp("__LINE__", $3) == 0
|| strcmp("__FILE__", $3) == 0
|| strcmp("__VERSION__", $3) == 0)
glcpp_error(& @1, parser, "Built-in (pre-defined)"
" macro names can not be undefined.");
- macro_t *macro = hash_table_find (parser->defines, $3);
+ macro = hash_table_find (parser->defines, $3);
if (macro) {
hash_table_remove (parser->defines, $3);
ralloc_free (macro);