public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers
@ 2023-11-21 14:49 Florian Weimer
  2023-11-21 23:45 ` Joseph Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2023-11-21 14:49 UTC (permalink / raw)
  To: gcc-patches

This program is compiled with an installed "cc" compiler, not the
built GCC compiler, so it should be as compatible as possible across a
wide range of compilers.

gcc/testsuite/

	* gcc.misc-tests/linkage-y.c (puts): Declare.
	(main): Add int return type and return 0.

---
 gcc/testsuite/gcc.misc-tests/linkage-y.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/testsuite/gcc.misc-tests/linkage-y.c b/gcc/testsuite/gcc.misc-tests/linkage-y.c
index eaffa5e4bb7..4235325f2cb 100644
--- a/gcc/testsuite/gcc.misc-tests/linkage-y.c
+++ b/gcc/testsuite/gcc.misc-tests/linkage-y.c
@@ -1,8 +1,11 @@
 /* 920717-y.c */
 
 extern const char s[];
+extern int puts(const char *);
 
+int
 main()
 {
 	puts(s);
+	return 0;
 }

base-commit: 700d70e4a2874645ddb67a8a335131d83b242e69


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

* Re: [PATCH] gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers
  2023-11-21 14:49 [PATCH] gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers Florian Weimer
@ 2023-11-21 23:45 ` Joseph Myers
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph Myers @ 2023-11-21 23:45 UTC (permalink / raw)
  To: Florian Weimer; +Cc: gcc-patches

On Tue, 21 Nov 2023, Florian Weimer wrote:

> This program is compiled with an installed "cc" compiler, not the
> built GCC compiler, so it should be as compatible as possible across a
> wide range of compilers.
> 
> gcc/testsuite/
> 
> 	* gcc.misc-tests/linkage-y.c (puts): Declare.
> 	(main): Add int return type and return 0.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

end of thread, other threads:[~2023-11-21 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21 14:49 [PATCH] gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers Florian Weimer
2023-11-21 23:45 ` Joseph Myers

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).