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:
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.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user