diff options
Diffstat (limited to 'src/glsl/glcpp')
-rw-r--r-- | src/glsl/glcpp/glcpp-parse.y | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 9b753ddecd4..f75834514f2 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -1944,6 +1944,10 @@ _define_object_macro (glcpp_parser_t *parser, { macro_t *macro, *previous; + /* We define pre-defined macros before we've started parsing the + * actual file. So if there's no location defined yet, that's what + * were doing and we don't want to generate an error for using the + * reserved names. */ if (loc != NULL) _check_for_reserved_macro_name(parser, loc, identifier); |