[Mesa-dev] [PATCH] glsl/glcpp: move macro declaration before code to fix MSVC build
Brian Paul
brianp at vmware.com
Wed Jul 9 16:18:19 PDT 2014
---
src/glsl/glcpp/glcpp-parse.y | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 21c85b4..084078e 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);
--
1.7.10.4
More information about the mesa-dev
mailing list