This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC stage 1] Proposed new warning: -Wmisleading-indentation


On 21/04/15 18:07, David Malcolm wrote:
On Thu, 2015-04-16 at 10:26 -0700, Mike Stump wrote:
Does it also handle:

if (cone);
   stmt;

?  Would be good to add that to the test suite, as that is another hard to spot common error that should be caught.

Not yet, but I agree that it would be a good thing to issue a warning
for.

GCC already warns for the above:

test.c:3:9: warning: suggest braces around empty body in an âifâ statement [-Wempty-body]
   if (a);
         ^

Cheers,

	Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]