gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Testing passed
|
Commit Message
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(+)
base-commit: 700d70e4a2874645ddb67a8a335131d83b242e69
Comments
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.
@@ -1,8 +1,11 @@
/* 920717-y.c */
extern const char s[];
+extern int puts(const char *);
+int
main()
{
puts(s);
+ return 0;
}