aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2003-12-30 12:18:28 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2003-12-30 12:18:28 +0000
commit74869a8523751c03db3264bcef72ade1c10bfa6a (patch)
tree45041e4ce33cce9ed6aa0b9a4de39c157311dcf1 /gcc/testsuite
parentb976c2fc2962376675a381fbccc814d546b1dfd4 (diff)
downloadgcc-74869a8523751c03db3264bcef72ade1c10bfa6a.zip
gcc-74869a8523751c03db3264bcef72ade1c10bfa6a.tar.gz
gcc-74869a8523751c03db3264bcef72ade1c10bfa6a.tar.bz2
re PR c++/13507 (spurious printf format warning)
cp: PR c++/13507 * decl.c (duplicate_decls): Use build_type_attribute_variant to merge attributes. testsuite: PR c++/13507 * g++.dg/ext/attrib11.C: New test. From-SVN: r75229
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib11.C17
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 992e6f4..d13331f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2003-12-30 Nathan Sidwell <nathan@codesourcery.com>
+ PR c++/13507
+ * g++.dg/ext/attrib11.C: New test.
+
PR c++/13494
* g++.dg/template/array2-1.C: New test.
* g++.dg/template/array2-2.C: New test.
diff --git a/gcc/testsuite/g++.dg/ext/attrib11.C b/gcc/testsuite/g++.dg/ext/attrib11.C
new file mode 100644
index 0000000..26bc790
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib11.C
@@ -0,0 +1,17 @@
+// { dg-do compile }
+// { dg-options "-Wall" }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 30 Dec 2003 <nathan@codesourcery.com>
+
+
+// PR c++/13507, spurious warning due to attribute clobbering
+extern "C" {
+ extern int printf (__const char *__restrict __format, ...) throw ();
+ extern int scanf (__const char *__restrict __format, ...) throw ();
+}
+
+void foo(unsigned int x)
+{
+ printf ("%d\n", x);
+}