On 13 November 2014 03:07, Mike Stump <mikest...@comcast.net> wrote:
> On Nov 12, 2014, at 3:52 PM, Manuel López-Ibáñez <lopeziba...@gmail.com> 
> wrote:
>> On 12 November 2014 22:41, Jakub Jelinek <ja...@redhat.com> wrote:
>>> I think we had discussions on this topic, the important thing is that we
>>> don't want to generate different warnings based on whether -save-temps has
>>> been used, there could be just comment in between ) and ; etc.
>>
>> How can --save-temps influence whether ";" is in the same line as the
>> 'if' or not?
>
> He was worried about:
>
> int main() {
>         if (1)/*hi*/;
> }
> mrs@alcmene:~/work1/gcc-c2e/gcc$ gcc -E tt.c
> int main() {
>  if (1) ;
> }
>
> but, no need to worry, there is a space in there.  People that get this wrong 
> do );, without a space.  They also don't have a comment in there either.  The 
> eye disappears the ; when right next to ), but, if there is a space, the eye 
> can find it pretty easy.

But that has nothing to do with the change I proposed, which is to not
warn if ";" is on a different line. The actual heuristics of Clang are
more complicated and avoid even more false positives, but our location
info is not precise enough yet to implement them.

Cheers,

Manuel.

Reply via email to