C std question: while loop with two tests.

Marc Glisse marc.glisse@inria.fr
Mon May 6 15:57:00 GMT 2013


On Mon, 6 May 2013, Steve Ellcey  wrote:

> I was using delta to cutdown a program and wound up with something like this.
> Is this really legal C?  GCC doesn't complain about it.

Let me reformat it a bit:

int foo(int x)
{
   while (1)
   {
     if (x > 0) continue;
   }

   while (0)
   ;
}

(missing a return maybe?)



More information about the Gcc-help mailing list