Re: [Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-05 Thread Timothy Arceri
Cc: mesa-sta...@lists.freedesktop.org On 01/09/18 23:57, Timothy Arceri wrote: If we have something like: #ifdef NOT_DEFINED #define A_MACRO(x) \ if (x) #endif The # on the #define is not skipped but the define itself is so this then gets recognised as #if. Until 28a3731e3

Re: [Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-05 Thread Ian Romanick
It took me a bit to wrap my head around this, but I believe it's correct. It also fixes things like this (which we didn't notice were broken): #ifdef NOT_DEFINED #define A_MACRO(x) \ #if 0 x #endif #endif Reviewed-by: Ian Romanick On 09/01/2018 06:57 AM, Timothy Arceri wrote: > If we h

Re: [Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-05 Thread Timothy Arceri
Ping! If I don't have any other feedback by tomorrow I'll push this with the Tested-by. Thanks. On 01/09/18 23:57, Timothy Arceri wrote: If we have something like: #ifdef NOT_DEFINED #define A_MACRO(x) \ if (x) #endif The # on the #define is not skipped but the define i

Re: [Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-03 Thread Timothy Arceri
On 03/09/18 22:00, Eero Tamminen wrote: Hi, Seems a lot of replicated code to deal with regression from few line line patch, That's because the previous patch didn't cause the regression. It fixed another bug which happened to be hiding this problem we are seeing now. but at least it fixe

Re: [Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-03 Thread Eero Tamminen
Hi, Seems a lot of replicated code to deal with regression from few line line patch, but at least it fixed the failing GfxBench ALU2 test. :-) Tested-By: Eero Tamminen - Eero On 01.09.2018 16:57, Timothy Arceri wrote: If we have something like: #ifdef NOT_DEFINED #define

[Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-01 Thread Timothy Arceri
If we have something like: #ifdef NOT_DEFINED #define A_MACRO(x) \ if (x) #endif The # on the #define is not skipped but the define itself is so this then gets recognised as #if. Until 28a3731e3f this didn't happen because we ended up in {NONSPACE} where BEGIN INITIAL was called