aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib1.C10
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 16d4816..74508a6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ Table-driven attributes.
+ * g++.dg/ext/attrib1.C: New test.
+
2001-09-20 DJ Delorie <dj@redhat.com>
* gcc.dg/20000926-1.c: Update expected warning messages.
diff --git a/gcc/testsuite/g++.dg/ext/attrib1.C b/gcc/testsuite/g++.dg/ext/attrib1.C
new file mode 100644
index 0000000..2bd69e8
--- /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 *, ...);