[Mesa-dev] [Mesa-stable] [PATCH 04/15] glsl: Add preprocessor error condition for #else directive
anuj.phogat at gmail.com
Wed Jun 11 18:56:32 PDT 2014
On Wed, Jun 11, 2014 at 6:51 PM, Carl Worth <cworth at cworth.org> wrote:
> Anuj Phogat <anuj.phogat at gmail.com> writes:
> >> #if 0
> >> #else garbage
> >> #endif
> >> 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
> > #endif
> 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:
Right. I'll drop this patch.
> #if 1
> #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 --------------
An HTML attachment was scrubbed...
More information about the mesa-dev