Commit Graph

2 Commits

Author SHA1 Message Date
Carl Worth
c4aaf7943c 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>
2011-09-30 11:44:16 -07:00
Carl Worth
cb5ea0c79b glcpp: Add several tests for diagnostics.
Which are proving to be useful since some of these tests are not yet
acting as desired, (in particular, the unterminated if test is not
generating any diagnostic).
2010-08-11 14:38:03 -07:00