Re: C89isms in the test suite
Sam James <[email protected]> Mon, 14 Nov 2022 04:36:17 +0000
| Newsgroups | dev.linux.lists.c-std-porting |
|---|---|
| Message-ID | <[email protected]> |
> On 21 Oct 2022, at 09:40, Florian Weimer via Gcc <[email protected]> wrote: > > 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. Would you be able to backport 6be2672e4ee41c566a9e072088cccca263bab5f7 and 885b6660c17fb91980b5682514ef54668e544b02 to the active <13 branches? Thanks, sam
signature.asc
(application/pgp-signature, 358 B)
-----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY3HFwV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kP5AAQCpSCo7q88xw0nEA7tPRIASMiiprWf8cdG+SceNZiOoKwEA65oHuWNP5oZ2 413XjlX9WsBWpm0JSoarFM/UnXyK6Ao= =g6sq -----END PGP SIGNATURE-----