public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5756] gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers
@ 2023-11-22 13:27 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2023-11-22 13:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:08ba7e8b98e71d72c2bb3860f8d3642ce380afdf

commit r14-5756-g08ba7e8b98e71d72c2bb3860f8d3642ce380afdf
Author: Florian Weimer <fweimer@redhat.com>
Date:   Wed Nov 22 14:26:53 2023 +0100

    gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers
    
    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.

Diff:
---
 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;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-22 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22 13:27 [gcc r14-5756] gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers Florian Weimer

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