This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
Source code (no includes needed, no preprocessor involved at all) ------------------------------------------------------------------------ template <int N> class T { void operator() (char const * ...) __attribute__((format(printf,2,3))); }; template class T<3>; ------------------------------------------------------------------------ This compiles fine with many different gcc versions up to including gcc-4.2.2 and does not compile with gcc-4.3. Error messages and details of compiler below. Regards Dirk Zoller gcc-4.3 -v gcc-4.3-bug.cc Using built-in specs. Target: i686-pc-linux-gnu Configured with: /pub/unpacked/gcc-4.3.0/configure --prefix=/opt/gnu/gcc-4.3.0 --program-suffix=-4.3 --enable-languages=c,c++ --disable-multilib --disable-nls --disable-shared Thread model: posix gcc version 4.3.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-mtune=generic' /opt/gnu/gcc-4.3.0/libexec/gcc/i686-pc-linux-gnu/4.3.0/cc1plus -quiet -v -D_GNU_SOURCE gcc-4.3-bug.cc -quiet -dumpbase gcc-4.3-bug.cc -mtune=generic -auxbase gcc-4.3-bug -version -o /tmp/ccTQ5AXY.s ignoring nonexistent directory "/opt/gnu/gcc-4.3.0/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /opt/gnu/gcc-4.3.0/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0 /opt/gnu/gcc-4.3.0/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/i686-pc-linux-gnu /opt/gnu/gcc-4.3.0/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/backward /usr/local/include /opt/gnu/gcc-4.3.0/include /opt/gnu/gcc-4.3.0/lib/gcc/i686-pc-linux-gnu/4.3.0/include /opt/gnu/gcc-4.3.0/lib/gcc/i686-pc-linux-gnu/4.3.0/include-fixed /usr/include End of search list. GNU C++ (GCC) version 4.3.0 (i686-pc-linux-gnu) compiled by GNU C version 4.3.0, GMP version 4.2.1, MPFR version 2.3.0. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 730a50d5d37a0cefcf09a41ca8133e43 gcc-4.3-bug.cc: In instantiation of 'T<3>': gcc-4.3-bug.cc:7: instantiated from here gcc-4.3-bug.cc:4: error: 'printf' was not declared in this scope gcc-4.3-bug.cc:4: error: unrecognized format specifier
This was probably broken by the attribute handling on templates changes.
*** Bug 35668 has been marked as a duplicate of this bug. ***
CCing Jason as he was the one who did the attribute delaying patches for 4.3.0.
Looking into this.
Subject: Bug 35546 Author: jakub Date: Wed Mar 26 20:34:14 2008 New Revision: 133615 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133615 Log: PR c++/35546 * pt.c (apply_late_template_attributes): Don't call tsubst on first attribute argument if it is IDENTIFIER_NODE. * g++.dg/ext/attrib33.C: New test. Added: trunk/gcc/testsuite/g++.dg/ext/attrib33.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 35546 Author: jakub Date: Wed Mar 26 20:36:50 2008 New Revision: 133616 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133616 Log: PR c++/35546 * pt.c (apply_late_template_attributes): Don't call tsubst on first attribute argument if it is IDENTIFIER_NODE. * g++.dg/ext/attrib33.C: New test. Added: branches/gcc-4_3-branch/gcc/testsuite/g++.dg/ext/attrib33.C Modified: branches/gcc-4_3-branch/gcc/cp/ChangeLog branches/gcc-4_3-branch/gcc/cp/pt.c branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
Fixed.
*** Bug 35890 has been marked as a duplicate of this bug. ***
*** Bug 36372 has been marked as a duplicate of this bug. ***