]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers
authorFlorian Weimer <fweimer@redhat.com>
Wed, 22 Nov 2023 13:26:53 +0000 (14:26 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 22 Nov 2023 13:26:53 +0000 (14:26 +0100)
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

index eaffa5e4bb77049bfbd797344294912087337dfb..4235325f2cb749a136a5e1a2ec7e408e991da0f9 100644 (file)
@@ -1,8 +1,11 @@
 /* 920717-y.c */
 
 extern const char s[];
+extern int puts(const char *);
 
+int
 main()
 {
        puts(s);
+       return 0;
 }