First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 35546
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Jakub Jelinek <jakub@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: duz@sol-3.de
Add CC:
CC:
Remove selected CCs
Build:
Patch URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 35546 depends on: Show dependency tree
Show dependency graph
Bug 35546 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2008-03-25 17:13 Opened: 2008-03-12 07:53
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

------- Comment #1 From Richard Guenther 2008-03-15 19:13 -------
This was probably broken by the attribute handling on templates changes.

------- Comment #2 From Richard Guenther 2008-03-22 18:53 -------
*** Bug 35668 has been marked as a duplicate of this bug. ***

------- Comment #3 From Andrew Pinski 2008-03-24 21:28 -------
CCing Jason as he was the one who did the attribute delaying patches for 4.3.0.

------- Comment #4 From Jakub Jelinek 2008-03-25 17:13 -------
Looking into this.

------- Comment #5 From Jakub Jelinek 2008-03-26 20:35 -------
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

------- Comment #6 From Jakub Jelinek 2008-03-26 20:37 -------
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

------- Comment #7 From Jakub Jelinek 2008-03-27 09:31 -------
Fixed.

------- Comment #8 From Andrew Pinski 2008-04-09 15:53 -------
*** Bug 35890 has been marked as a duplicate of this bug. ***

------- Comment #9 From Andrew Pinski 2008-05-29 15:07 -------
*** Bug 36372 has been marked as a duplicate of this bug. ***

First Last Prev Next    No search results available      Search page      Enter new bug