From c4aaf7943c2cdff0e2148b5c05813356dc99696d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 29 Sep 2011 21:44:52 -0700 Subject: 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 Reviewed-by: Eric Anholt Signed-off-by: Carl Worth --- src/glsl/glcpp/tests/086-reserved-macro-names.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/glsl/glcpp/tests/086-reserved-macro-names.c') diff --git a/src/glsl/glcpp/tests/086-reserved-macro-names.c b/src/glsl/glcpp/tests/086-reserved-macro-names.c index fd0c29f0c47..a6b7201f95d 100644 --- a/src/glsl/glcpp/tests/086-reserved-macro-names.c +++ b/src/glsl/glcpp/tests/086-reserved-macro-names.c @@ -1,2 +1,3 @@ #define __BAD reserved #define GL_ALSO_BAD() also reserved +#define THIS__TOO__IS__BAD reserved -- cgit v1.2.3