while loop is badly formatted in the following example.  Although an "obvious"
bug, this type of thing can occur when modifying existing code having do-while
statements and converting them to while statements.

bool f()
{
  return true;
}

void g()
{
  bool b( false );

  while ( !b )
  {
    b = f();
  } while ( !b );
}


-- 
           Summary: GCC accepts badly formatted while statement
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gp dot bolton at computer dot org
 GCC build triplet: i386-apple-darwin9.6.0
  GCC host triplet: i386-apple-darwin9.6.0
GCC target triplet: i386-apple-darwin9.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39012

Reply via email to