* Re: C89isms in the test suite [not found] <87wn8tbmdr.fsf@oldenburg.str.redhat.com> @ 2022-11-14 4:36 ` Sam James 2022-11-14 8:19 ` Florian Weimer 0 siblings, 1 reply; 4+ messages in thread From: Sam James @ 2022-11-14 4:36 UTC (permalink / raw) To: Florian Weimer; +Cc: GCC Development, c-std-porting [-- Attachment #1: Type: text/plain, Size: 1112 bytes --] > On 21 Oct 2022, at 09:40, Florian Weimer via Gcc <gcc@gcc.gnu.org> 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 [-- Attachment #2: Message signed with OpenPGP --] [-- Type: application/pgp-signature, Size: 358 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: C89isms in the test suite 2022-11-14 4:36 ` C89isms in the test suite Sam James @ 2022-11-14 8:19 ` Florian Weimer 2022-11-15 5:05 ` Sam James 2022-11-21 11:12 ` Jakub Jelinek 0 siblings, 2 replies; 4+ messages in thread From: Florian Weimer @ 2022-11-14 8:19 UTC (permalink / raw) To: Jakub Jelinek; +Cc: Sam James, GCC Development, c-std-porting * Sam James: > Would you be able to backport 6be2672e4ee41c566a9e072088cccca263bab5f7 > and 885b6660c17fb91980b5682514ef54668e544b02 to the active <13 > branches? Jakub, okay to backport these two (to 12, 11, 10 I presume)? commit 6be2672e4ee41c566a9e072088cccca263bab5f7 Author: Florian Weimer <fweimer@redhat.com> Date: Tue Oct 18 16:58:48 2022 +0200 libsanitizer: Avoid implicit function declaration in configure test libsanitizer/ * configure.ac (sanitizer_supported): Include <unistd.h> for syscall prototype. * configure: Regenerate. commit 885b6660c17fb91980b5682514ef54668e544b02 Author: Florian Weimer <fweimer@redhat.com> Date: Tue Oct 18 16:58:48 2022 +0200 libiberty: Fix C89-isms in configure tests libiberty/ * acinclude.m4 (ac_cv_func_strncmp_works): Add missing int return type and parameter list to the definition of main. Include <stdlib.h> and <string.h> for prototypes. (ac_cv_c_stack_direction): Add missing int return type and parameter list to the definitions of main, find_stack_direction. Include <stdlib.h> for exit prototype. * configure: Regenerate. Thanks, Florian ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: C89isms in the test suite 2022-11-14 8:19 ` Florian Weimer @ 2022-11-15 5:05 ` Sam James 2022-11-21 11:12 ` Jakub Jelinek 1 sibling, 0 replies; 4+ messages in thread From: Sam James @ 2022-11-15 5:05 UTC (permalink / raw) To: Florian Weimer; +Cc: Jakub Jelinek, GCC Development, c-std-porting [-- Attachment #1: Type: text/plain, Size: 455 bytes --] > On 14 Nov 2022, at 08:19, Florian Weimer <fweimer@redhat.com> wrote: > > * Sam James: > >> Would you be able to backport 6be2672e4ee41c566a9e072088cccca263bab5f7 >> and 885b6660c17fb91980b5682514ef54668e544b02 to the active <13 >> branches? > > Jakub, okay to backport these two (to 12, 11, 10 I presume)? (Yes please. It's also given me something to poke at as I didn't log the failure and only noticed when libasan wasn't installed...) Thanks. [-- Attachment #2: Message signed with OpenPGP --] [-- Type: application/pgp-signature, Size: 358 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: C89isms in the test suite 2022-11-14 8:19 ` Florian Weimer 2022-11-15 5:05 ` Sam James @ 2022-11-21 11:12 ` Jakub Jelinek 1 sibling, 0 replies; 4+ messages in thread From: Jakub Jelinek @ 2022-11-21 11:12 UTC (permalink / raw) To: Florian Weimer; +Cc: Sam James, GCC Development, c-std-porting On Mon, Nov 14, 2022 at 09:19:26AM +0100, Florian Weimer wrote: > * Sam James: > > > Would you be able to backport 6be2672e4ee41c566a9e072088cccca263bab5f7 > > and 885b6660c17fb91980b5682514ef54668e544b02 to the active <13 > > branches? > > Jakub, okay to backport these two (to 12, 11, 10 I presume)? Ok. > commit 6be2672e4ee41c566a9e072088cccca263bab5f7 > Author: Florian Weimer <fweimer@redhat.com> > Date: Tue Oct 18 16:58:48 2022 +0200 > > libsanitizer: Avoid implicit function declaration in configure test > > libsanitizer/ > > * configure.ac (sanitizer_supported): Include <unistd.h> for > syscall prototype. > * configure: Regenerate. > > commit 885b6660c17fb91980b5682514ef54668e544b02 > Author: Florian Weimer <fweimer@redhat.com> > Date: Tue Oct 18 16:58:48 2022 +0200 > > libiberty: Fix C89-isms in configure tests > > libiberty/ > > * acinclude.m4 (ac_cv_func_strncmp_works): Add missing > int return type and parameter list to the definition of main. > Include <stdlib.h> and <string.h> for prototypes. > (ac_cv_c_stack_direction): Add missing > int return type and parameter list to the definitions of > main, find_stack_direction. Include <stdlib.h> for exit > prototype. > * configure: Regenerate. Jakub ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-21 11:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87wn8tbmdr.fsf@oldenburg.str.redhat.com>
2022-11-14 4:36 ` C89isms in the test suite 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