glcpp: Disallow undefining GL_* builtin macros.
Fixes the piglit test: spec/glsl-es-3.00/compiler/undef-GL_ES.vert Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
ed56c16820
commit
b49a069bd3
|
@ -290,7 +290,8 @@ control_line_success:
|
|||
macro_t *macro;
|
||||
if (strcmp("__LINE__", $4) == 0
|
||||
|| strcmp("__FILE__", $4) == 0
|
||||
|| strcmp("__VERSION__", $4) == 0)
|
||||
|| strcmp("__VERSION__", $4) == 0
|
||||
|| strncmp("GL_", $4, 3) == 0)
|
||||
glcpp_error(& @1, parser, "Built-in (pre-defined)"
|
||||
" macro names can not be undefined.");
|
||||
|
||||
|
|
Loading…
Reference in New Issue