[Mesa-stable] [Mesa-dev] [PATCH 04/15] glsl: Add preprocessor error condition for #else directive
Anuj Phogat
anuj.phogat at gmail.com
Fri Jun 13 10:52:06 PDT 2014
On Thu, Jun 12, 2014 at 11:42 PM, Tapani Pälli <tapani.palli at intel.com> wrote:
> On 06/07/2014 02:57 AM, Anuj Phogat wrote:
>> Fixes gles3 Khronos CTS tests:
>> tokens_after_else_vertex
>> tokens_after_else_fragment
>>
>> Cc: <mesa-stable at lists.freedesktop.org>
>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>> ---
>> src/glsl/glcpp/glcpp-lex.l | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
>> index 188e454..393db81 100644
>> --- a/src/glsl/glcpp/glcpp-lex.l
>> +++ b/src/glsl/glcpp/glcpp-lex.l
>> @@ -221,6 +221,10 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
>> return HASH_ELSE;
>> }
>>
>> +{HASH}else{HSPACE}*[^ \t\n]+ {
>
> I can't find exact specification for a 'new-line' from the spec, so IMO
> we should allow '\r' also here.
>
I've dropped this patch from the series after Carl's comment. Now, Carl
has posted a patch to fix the issue.
>> + glcpp_error(yylloc, yyextra, "illegal tokens after #else");
>> +}
>> +
>> {HASH}endif {
>> yyextra->space_tokens = 0;
>> return HASH_ENDIF;
>
> // Tapani
>
More information about the mesa-stable
mailing list