public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* C89isms in the test suite
@ 2022-10-21  8:40 Florian Weimer
  2022-10-21  8:57 ` Jakub Jelinek
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Florian Weimer @ 2022-10-21  8:40 UTC (permalink / raw)
  To: gcc

What should we do about these when they are not relevant to what's being
tested?  For example, gcc/testsuite/gcc.c-torture/execute/ieee/mzero6.c
has this:

  int main ()
  {
    if (__builtin_copysign (1.0, func (0.0 / -5.0, 10)) != -1.0)
      abort ();
    exit (0);
  }

but no include files, so abort and exit are implicitly declared.

Should we inject a header with -include with the most common
declarations (which includes at least abort and exit)?  Or add the
missing #include directives?  But the latter might not work for
freestanding targets.

Implicit ints and function declarations without prototypes are also
common (not just for main).

Other tests look like they might be intended to be built in C89 mode,
e.g.  gcc/testsuite/gcc.c-torture/compile/386.c, although it's not
immediately obvious to me what they test.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-11-21 11:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  8:40 C89isms in the test suite Florian Weimer
2022-10-21  8:57 ` Jakub Jelinek
2022-10-21  9:17   ` Florian Weimer
2022-10-21  9:36     ` Jakub Jelinek
2022-10-21 10:01       ` Florian Weimer
2022-10-21 10:57         ` Florian Weimer
2022-10-21 21:00         ` Joseph Myers
2022-10-21 21:52           ` Florian Weimer
2022-10-21 20:57     ` Joseph Myers
2022-10-21 20:54 ` Joseph Myers
2022-10-21 21:46   ` Florian Weimer
2022-11-14  4:36 ` Sam James
2022-11-14  8:19   ` Florian Weimer
2022-11-15  5:05     ` Sam James
2022-11-21 11:12     ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).