PATCH for testsuite to avoid false FAILs

Jeffrey A Law law@cygnus.com
Tue Dec 8 00:30:00 GMT 1998


  In message < 4.1.19981204115309.00975600@mail.lauterbach.com >you write:
  > At 10:08 04.12.98 , Jeffrey A Law wrote:
  > >
  > >  In message < 4.1.19981202160718.0384aed0@mail.lauterbach.com >you write:
  > >  > Hi,
  > >  > 
  > >  > a recent (last 2 days) warning change, causes some tests to report fal
  > se
  > >  > FAILs, here's a patch.
  > >Can you be more specific about why they're failing now?
  > >
  > >It seems to me that if the compiler if a test is suddenly failing because
  > >(for example) noop below is returning an implicit int instead of a void
  > >that something far more problematical is happening and that changing the
  > >tests is just papering over a bug.
  > >
  > >ie, has something changed in the compiler which makes the code in the
  > >testsuites no longer valid?  I don't think so.  If not, then changing the
  > >testsuites is absolutely the wrong thing to do.
  > 
  > Hmm, then it seems some warnings are enable now by default? Without the fix
  > I get:
  > [fsirl@kernel:~/obj/cvsm/gcc]$ ./xgcc -B./ -O2
  > ~/egcsm/gcc/testsuite/gcc.c-torture/special/930510-1.c
  > /home/fsirl/egcsm/gcc/testsuite/gcc.c-torture/special/930510-1.c:2:
  > undefined or invalid # directive
  > /home/fsirl/egcsm/gcc/testsuite/gcc.c-torture/special/930510-1.c:3:
  > warning: type defaults to `int' in declaration of `main'
  > 
  > The warning is not present when I compile with egcs-1.1.1.
I'd bet it's the C9X stuff that is triggering the warnings about type defaults.

If Richard or Ulrich can confirm this to be the case, then we'll go ahead and
install your patch since at some point we'll want the compiler to be in C9X
mode by default (it is right now, but we'll probably revert that for a short
while).

The issue gentlemen is this code now gets a warning from the compiler when
it did not before:

main () {}



jeff



More information about the Gcc-patches mailing list