diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/attrib1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/attrib1.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/attrib1.C b/gcc/testsuite/g++.dg/ext/attrib1.C new file mode 100644 index 000000000..2bd69e82a --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/attrib1.C @@ -0,0 +1,10 @@ +// Test for interpretation of attribute immediately before function name. +// Origin: Joseph Myers <jsm28@cam.ac.uk> +// { dg-do compile } + +// An attribute immediately before the function name should in this +// case properly apply to the return type, but compatibility with +// existing code using this form requires it to apply to the function +// type instead in the case of attributes applying to function types, +// and to the declaration in the case of attributes applying to declarations. +int ****__attribute__((format(printf, 1, 2))) foo(const char *, ...); |