public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35546]  New: __attribute__(format...) broken for membes of template classes?
@ 2008-03-12  7:53 duz at sol-3 dot de
  2008-03-12 16:53 ` [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: duz at sol-3 dot de @ 2008-03-12  7:53 UTC (permalink / raw)
  To: gcc-bugs

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


-- 
           Summary: __attribute__(format...) broken for membes of template
                    classes?
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: duz at sol-3 dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
@ 2008-03-12 16:53 ` pinskia at gcc dot gnu dot org
  2008-03-15 19:13 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-12 16:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
            Summary|__attribute__(format...)    |[4.3/4.4 Regression]
                   |broken for members of       |__attribute__(format...)
                   |template classes?           |broken for members of
                   |                            |template classes?
   Target Milestone|---                         |4.3.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
  2008-03-12 16:53 ` [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members " pinskia at gcc dot gnu dot org
@ 2008-03-15 19:13 ` rguenth at gcc dot gnu dot org
  2008-03-22 18:54 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-15 19:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-03-15 19:13 -------
This was probably broken by the attribute handling on templates changes.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
           Priority|P3                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-15 19:13:13
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
  2008-03-12 16:53 ` [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members " pinskia at gcc dot gnu dot org
  2008-03-15 19:13 ` rguenth at gcc dot gnu dot org
@ 2008-03-22 18:54 ` rguenth at gcc dot gnu dot org
  2008-03-24 21:28 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-22 18:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-03-22 18:53 -------
*** Bug 35668 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
                   ` (2 preceding siblings ...)
  2008-03-22 18:54 ` rguenth at gcc dot gnu dot org
@ 2008-03-24 21:28 ` pinskia at gcc dot gnu dot org
  2008-03-25 17:13 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-24 21:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-03-24 21:28 -------
CCing Jason as he was the one who did the attribute delaying patches for 4.3.0.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
                   ` (3 preceding siblings ...)
  2008-03-24 21:28 ` pinskia at gcc dot gnu dot org
@ 2008-03-25 17:13 ` jakub at gcc dot gnu dot org
  2008-03-26 20:35 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-03-25 17:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-03-25 17:13 -------
Looking into this.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-03-15 19:13:13         |2008-03-25 17:13:04
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
                   ` (4 preceding siblings ...)
  2008-03-25 17:13 ` jakub at gcc dot gnu dot org
@ 2008-03-26 20:35 ` jakub at gcc dot gnu dot org
  2008-03-26 20:38 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-03-26 20:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
                   ` (5 preceding siblings ...)
  2008-03-26 20:35 ` jakub at gcc dot gnu dot org
@ 2008-03-26 20:38 ` jakub at gcc dot gnu dot org
  2008-03-27  9:32 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-03-26 20:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
                   ` (6 preceding siblings ...)
  2008-03-26 20:38 ` jakub at gcc dot gnu dot org
@ 2008-03-27  9:32 ` jakub at gcc dot gnu dot org
  2008-04-09 15:54 ` pinskia at gcc dot gnu dot org
  2008-05-29 15:08 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-03-27  9:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2008-03-27 09:31 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
                   ` (7 preceding siblings ...)
  2008-03-27  9:32 ` jakub at gcc dot gnu dot org
@ 2008-04-09 15:54 ` pinskia at gcc dot gnu dot org
  2008-05-29 15:08 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-04-09 15:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2008-04-09 15:53 -------
*** Bug 35890 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zak at transversal dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members of template classes?
  2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
                   ` (8 preceding siblings ...)
  2008-04-09 15:54 ` pinskia at gcc dot gnu dot org
@ 2008-05-29 15:08 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-29 15:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2008-05-29 15:07 -------
*** Bug 36372 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joerg dot richter at pdv-fs
                   |                            |dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35546


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-29 15:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-12  7:53 [Bug c++/35546] New: __attribute__(format...) broken for membes of template classes? duz at sol-3 dot de
2008-03-12 16:53 ` [Bug c++/35546] [4.3/4.4 Regression] __attribute__(format...) broken for members " pinskia at gcc dot gnu dot org
2008-03-15 19:13 ` rguenth at gcc dot gnu dot org
2008-03-22 18:54 ` rguenth at gcc dot gnu dot org
2008-03-24 21:28 ` pinskia at gcc dot gnu dot org
2008-03-25 17:13 ` jakub at gcc dot gnu dot org
2008-03-26 20:35 ` jakub at gcc dot gnu dot org
2008-03-26 20:38 ` jakub at gcc dot gnu dot org
2008-03-27  9:32 ` jakub at gcc dot gnu dot org
2008-04-09 15:54 ` pinskia at gcc dot gnu dot org
2008-05-29 15:08 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).