[tree-ssa] Statement with no effect warning

Diego Novillo dnovillo@redhat.com
Tue Dec 16 19:22:00 GMT 2003


On Tue, 2003-12-16 at 13:59, Geoff Keating wrote:

> Can we fix this?  It would be better if it was impossible to write
> code that will build on a compiler with checking enabled but won't
> build on a compiler with checking disabled.
>
Contrived, but shows one recent example:

foo(int a, int n)
{
   int m = a;

#if defined ENABLE_CHECKING
   if (m == 0)
     abort ();
#endif

  return n / a;
}



More information about the Gcc mailing list