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

Reply via email to