From 08ba7e8b98e71d72c2bb3860f8d3642ce380afdf Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 22 Nov 2023 14:26:53 +0100 Subject: [PATCH] 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. --- 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 eaffa5e4bb77..4235325f2cb7 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; } -- 2.47.2