This is the mail archive of the gcc-bugs@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]

[Bug c/66298] New: -Wmisleading-indentation should also detect missing indentation


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66298

            Bug ID: 66298
           Summary: -Wmisleading-indentation should also detect missing
                    indentation
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: mpolacek at gcc dot gnu.org
  Target Milestone: ---

First, I really like the new warning - and it detected some long-standing bugs. 

However, I recently came across a code like the following, which is not
detected - but I think it should. (In the real-world code, the ";" was missing
and the indentation was fine.)

----------- <cut> ------------
void do_something (void);
int check_something (void);

void some_func (void)
{
  while (check_something())  /* No semicolon here but also */
  do_something();            /* no indentation here. */
}


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