[Mesa-dev] [Mesa-stable] [PATCH 04/15] glsl: Add preprocessor error condition for #else directive
cworth at cworth.org
Wed Jun 11 18:51:33 PDT 2014
Anuj Phogat <anuj.phogat at gmail.com> writes:
>> #if 0
>> #else garbage
>> The Khronos test contains two tokens after #else. I'm not sure if that
>> is the difference or not.
> Khronos is testing many different cases. Failing case tests:
> #if 1
> #else garbage
It is the "#if 1" that causes the existing code to catch the garbage
after #else. So yes, the existing test case does need to be expanded.
In the meantime, the proposed fix (to the lexer) is not correct as it
will cause an error in the following case which should be accepted:
#else /* comments are whitespace, not garbage */
I'll poke around at the existing code to see why the garbage after #else
is caught with #if 0, but not with #if 1.
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 818 bytes
Desc: not available
More information about the mesa-dev