Module: Mesa Branch: master Commit: 1a46dd6edd6a50624fd5cc876bc22dce99bd9326 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a46dd6edd6a50624fd5cc876bc22dce99bd9326
Author: Carl Worth <cwo...@cworth.org> Date: Wed Jun 11 17:20:40 2014 -0700 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.pho...@gmail.com> --- src/glsl/glcpp/tests/120-undef-builtin.c | 3 +++ src/glsl/glcpp/tests/120-undef-builtin.c.expected | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/glsl/glcpp/tests/120-undef-builtin.c b/src/glsl/glcpp/tests/120-undef-builtin.c new file mode 100644 index 0000000..49e7696 --- /dev/null +++ b/src/glsl/glcpp/tests/120-undef-builtin.c @@ -0,0 +1,3 @@ +#undef __LINE__ +#undef __FILE__ +#undef __VERSION__ diff --git a/src/glsl/glcpp/tests/120-undef-builtin.c.expected b/src/glsl/glcpp/tests/120-undef-builtin.c.expected new file mode 100644 index 0000000..d6981dc --- /dev/null +++ b/src/glsl/glcpp/tests/120-undef-builtin.c.expected @@ -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. + + + + _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit