glcpp: Raise error if defining any macro containing two consecutive underscores
The specification reserves any macro name containing two consecutive underscores, (anywhere within the name). Previously, we only raised this error for macro names that started with two underscores. Fix the implementation to check for two underscores anywhere, and also update the corresponding 086-reserved-macro-names test. This also fixes the following two piglit tests: spec/glsl-1.30/preprocessor/reserved/double-underscore-02.frag spec/glsl-1.30/preprocessor/reserved/double-underscore-03.frag Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Carl Worth <cworth@cworth.org>
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
0:1(10): preprocessor error: Macro names starting with "__" are reserved.
|
||||
0:1(10): preprocessor error: Macro names containing "__" are reserved.
|
||||
|
||||
0:2(9): preprocessor error: Macro names starting with "GL_" are reserved.
|
||||
|
||||
0:3(9): preprocessor error: Macro names containing "__" are reserved.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user