On Sat, Jun 29, 2013 at 4:48 PM, Dimitry Andric <[email protected]> wrote:
> On Jun 27, 2013, at 01:16, Richard Smith <[email protected]> wrote:
>> Author: rsmith
>> Date: Wed Jun 26 18:16:51 2013
>> New Revision: 185035
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=185035&view=rev
>> Log:
>> PR16467: Teach -Wunsequenced that in C11 (unlike C++11), an assignment's
>> side-effect is not sequenced before its value computation. Also fix a
>> mishandling of ?: expressions where the condition is constant that was
>> exposed by the tests for this.
>
>
> Hi Richard,
>
> After this commit, the -Wunsequenced warning seems to have gotten a little 
> too aggressive.  It now also warns about the following (admittedly silly) 
> construction:
>
> char *foo(char *p);
>
> void bar(char *p)
> {
>   p = foo(++p);
> }
>
> // unseq.c:5:11: warning: multiple unsequenced modifications to 'p' 
> [-Wunsequenced]
> //   p = foo(++p);
> //     ~     ^
>
> Since a function call is a sequence point, the warning is not warranted in 
> its current form.
>
> Shall I re-open PR16467, or create a new PR?

Neither, I fixed this in r185282. Thanks for reporting it!
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to