[PATCH] Fix to PR8880 (clang dies processing a for loop).

Serge Pavlov sepavloff at gmail.com
Mon Nov 11 03:04:39 PST 2013


Friendly ping.


2013/11/4 Serge Pavlov <sepavloff at gmail.com>

> Friendly ping.
>
>
> 2013/10/25 Serge Pavlov <sepavloff at gmail.com>
>
>> sepavloff added you to the CC list for the revision "Fix to PR8880 (clang
>> dies processing a for loop).".
>>
>> Due to statement expressions supported as GCC extension, it is possible
>> to put 'break' or 'continue' into a loop/switch statement but outside
>> its body, for example:
>>
>>     for ( ; ({ if (first) { first = 0; continue; } 0; }); )
>>
>> Such usage must be diagnosed as an error, GCC rejects it.
>> To recognize such patterns flags BreakScope and ContinueScope are
>> temporarily turned off while parsing condition expression.
>>
>> http://llvm-reviews.chandlerc.com/D2018
>>
>> Files:
>>   include/clang/Basic/DiagnosticSemaKinds.td
>>   include/clang/Parse/Parser.h
>>   include/clang/Sema/Scope.h
>>   lib/Parse/ParseStmt.cpp
>>   lib/Parse/Parser.cpp
>>   lib/Sema/Scope.cpp
>>   test/Parser/bad-control.c
>>   test/Sema/statements.c
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
>
>
> --
> Thanks,
> --Serge
>



-- 
Thanks,
--Serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131111/bab1a6f2/attachment.html>


More information about the cfe-commits mailing list