mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
glsl/glcpp: Add test to ensure compiler won't allow #undef for some builtins
Currently verifying that an #undef of __FILE__, __LINE__, or __VERSION__ will generate an error. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
64b7fc2dd1
commit
1a46dd6edd
2 changed files with 10 additions and 0 deletions
3
src/glsl/glcpp/tests/120-undef-builtin.c
Normal file
3
src/glsl/glcpp/tests/120-undef-builtin.c
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#undef __LINE__
|
||||
#undef __FILE__
|
||||
#undef __VERSION__
|
||||
7
src/glsl/glcpp/tests/120-undef-builtin.c.expected
Normal file
7
src/glsl/glcpp/tests/120-undef-builtin.c.expected
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
0:1(2): preprocessor error: Built-in (pre-defined) macro names can not be undefined.
|
||||
0:2(1): preprocessor error: Built-in (pre-defined) macro names can not be undefined.
|
||||
0:3(1): preprocessor error: Built-in (pre-defined) macro names can not be undefined.
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue