public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25868]  New: Multiple templates and typedefs cause function prototype not to match
@ 2006-01-20  4:46 1l8p4ex95x5001 at sneakemail dot com
  2006-01-20  4:47 ` [Bug c++/25868] " 1l8p4ex95x5001 at sneakemail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: 1l8p4ex95x5001 at sneakemail dot com @ 2006-01-20  4:46 UTC (permalink / raw)
  To: gcc-bugs

I have one template class munge_type which takes a type and has a typedef in
it, new_type.  Another template class has another typedef in it, inner_type,
and a method that returns munge_type<inner_type>::new_type.  If I define the
method outside the class, I get these errors:

gtp8.cpp:17: error: prototype for `typename munge_type<typename
some_class<type>::inner_type>::new_type some_class<type>::method()' does not
match any in class `some_class<type>'
gtp8.cpp:11: error: candidate is: int some_class<type>::method()
gtp8.cpp:17: error: template definition of non-template `typename
munge_type<typename some_class<type>::inner_type>::new_type
some_class<type>::method()'

I'll attach the file that gives these errors.  Tested on gentoo with gcc 3.4.4
and gcc 4.0.2 (which both exhibit the problem) and 3.3.6 (which does not give
an error).


-- 
           Summary: Multiple templates and typedefs cause function prototype
                    not to match
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: 1l8p4ex95x5001 at sneakemail dot com
 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=25868


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

* [Bug c++/25868] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
@ 2006-01-20  4:47 ` 1l8p4ex95x5001 at sneakemail dot com
  2006-01-20 10:19 ` [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: 1l8p4ex95x5001 at sneakemail dot com @ 2006-01-20  4:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from 1l8p4ex95x5001 at sneakemail dot com  2006-01-20 04:47 -------
Created an attachment (id=10681)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10681&action=view)
File exhibiting problem when compiled with "g++ -c gtp8.cpp"

% gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/gcc-4.0.2-r3/work/gcc-4.0.2/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.0.2
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libmudflap --disable-libgcj --enable-languages=c,c++,f95
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu
Thread model: posix
gcc version 4.0.2 (Gentoo 4.0.2-r3, pie-8.7.8)


-- 


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


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

* [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
  2006-01-20  4:47 ` [Bug c++/25868] " 1l8p4ex95x5001 at sneakemail dot com
@ 2006-01-20 10:19 ` rguenth at gcc dot gnu dot org
  2006-01-20 14:15 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-01-20 10:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2006-01-20 10:19 -------
Confirmed.  I can't see anything wrong with the testcase.  EDG accepts it in
-strict_ansi mode, as does the old C++ parser.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |
           Keywords|                            |rejects-valid
      Known to fail|                            |3.4.5 4.0.3 4.1.0 4.2.0
      Known to work|                            |3.3.6
   Last reconfirmed|0000-00-00 00:00:00         |2006-01-20 10:19:41
               date|                            |
            Summary|Multiple templates and      |[3.4/4.0/4.1/4.2 Regression]
                   |typedefs cause function     |Multiple templates and
                   |prototype not to match      |typedefs cause function
                   |                            |prototype not to match


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


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

* [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
  2006-01-20  4:47 ` [Bug c++/25868] " 1l8p4ex95x5001 at sneakemail dot com
  2006-01-20 10:19 ` [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
@ 2006-01-20 14:15 ` pinskia at gcc dot gnu dot org
  2006-01-21  4:31 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-20 14:15 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
   Target Milestone|---                         |4.0.3


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


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

* [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (2 preceding siblings ...)
  2006-01-20 14:15 ` pinskia at gcc dot gnu dot org
@ 2006-01-21  4:31 ` mmitchel at gcc dot gnu dot org
  2006-01-25  6:32 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-01-21  4:31 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (3 preceding siblings ...)
  2006-01-21  4:31 ` mmitchel at gcc dot gnu dot org
@ 2006-01-25  6:32 ` mmitchel at gcc dot gnu dot org
  2006-02-13 17:13 ` bangerth at dealii dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-01-25  6:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mmitchel at gcc dot gnu dot org  2006-01-25 06:32 -------
This is going to be hard to fix.  We have two choices: either re-parse the
decl-specifiers after we know the class in which the function is being defined,
or (better) substitute into the function return type at that point.  I'm going
to mark this as P2; it's rejects-valid, not wrong-code.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (4 preceding siblings ...)
  2006-01-25  6:32 ` mmitchel at gcc dot gnu dot org
@ 2006-02-13 17:13 ` bangerth at dealii dot org
  2006-02-24  0:28 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2006-02-13 17:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from bangerth at dealii dot org  2006-02-13 17:13 -------
May be related to PR26261.


-- 


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


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

* [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (5 preceding siblings ...)
  2006-02-13 17:13 ` bangerth at dealii dot org
@ 2006-02-24  0:28 ` mmitchel at gcc dot gnu dot org
  2006-05-25  2:47 ` [Bug c++/25868] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-24  0:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2006-02-24 00:26 -------
This issue will not be resolved in GCC 4.1.0; retargeted at GCC 4.1.1.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.3                       |4.1.1


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


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

* [Bug c++/25868] [4.0/4.1/4.2 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (6 preceding siblings ...)
  2006-02-24  0:28 ` mmitchel at gcc dot gnu dot org
@ 2006-05-25  2:47 ` mmitchel at gcc dot gnu dot org
  2006-08-28  5:19 ` [Bug c++/25868] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25  2:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2006-05-25 02:33 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.1                       |4.1.2


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


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

* [Bug c++/25868] [4.0/4.1 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (7 preceding siblings ...)
  2006-05-25  2:47 ` [Bug c++/25868] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
@ 2006-08-28  5:19 ` pinskia at gcc dot gnu dot org
  2006-08-28  5:22 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-28  5:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-08-28 05:19 -------
Fixed in "4.2.0 20060827", was broken in "4.2.0 20060823".

Janis,
  Could you run a regression hunt to figure out what fixed this?

Thanks,
Andrew Pinski


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janis at gcc dot gnu dot org
      Known to fail|3.4.5 4.0.3 4.1.0 4.2.0     |3.4.5 4.0.3 4.1.0
      Known to work|3.3.6 3.3.3 3.2.3           |3.3.6 3.3.3 3.2.3 4.2.0
            Summary|[4.0/4.1/4.2 Regression]    |[4.0/4.1 Regression]
                   |Multiple templates and      |Multiple templates and
                   |typedefs cause function     |typedefs cause function
                   |prototype not to match      |prototype not to match


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


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

* [Bug c++/25868] [4.0/4.1 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (8 preceding siblings ...)
  2006-08-28  5:19 ` [Bug c++/25868] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2006-08-28  5:22 ` pinskia at gcc dot gnu dot org
  2006-08-28 22:14 ` janis at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-28  5:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2006-08-28 05:22 -------
(In reply to comment #7)
Note I am thinking revision 116409 fixed this but I am not too sure.


-- 


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


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

* [Bug c++/25868] [4.0/4.1 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (9 preceding siblings ...)
  2006-08-28  5:22 ` pinskia at gcc dot gnu dot org
@ 2006-08-28 22:14 ` janis at gcc dot gnu dot org
  2006-10-18  9:19 ` [Bug c++/25868] [4.0 " rguenth at gcc dot gnu dot org
  2007-02-13  2:59 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-08-28 22:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from janis at gcc dot gnu dot org  2006-08-28 22:14 -------
A regression hunt on powerpc-linux identified this patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=116409

    r116409 | nathan | 2006-08-25 16:56:07 +0000 (Fri, 25 Aug 2006)


-- 

janis at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/25868] [4.0 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (10 preceding siblings ...)
  2006-08-28 22:14 ` janis at gcc dot gnu dot org
@ 2006-10-18  9:19 ` rguenth at gcc dot gnu dot org
  2007-02-13  2:59 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-18  9:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2006-10-18 09:18 -------
Fixed on the 4.1 branch by backporting the fix for PR27787.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |27787
            Summary|[4.0/4.1 Regression]        |[4.0 Regression] Multiple
                   |Multiple templates and      |templates and typedefs cause
                   |typedefs cause function     |function prototype not to
                   |prototype not to match      |match


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


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

* [Bug c++/25868] [4.0 Regression] Multiple templates and typedefs cause function prototype not to match
  2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
                   ` (11 preceding siblings ...)
  2006-10-18  9:19 ` [Bug c++/25868] [4.0 " rguenth at gcc dot gnu dot org
@ 2007-02-13  2:59 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-13  2:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2007-02-13 02:58 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-02-13  2:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-20  4:46 [Bug c++/25868] New: Multiple templates and typedefs cause function prototype not to match 1l8p4ex95x5001 at sneakemail dot com
2006-01-20  4:47 ` [Bug c++/25868] " 1l8p4ex95x5001 at sneakemail dot com
2006-01-20 10:19 ` [Bug c++/25868] [3.4/4.0/4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
2006-01-20 14:15 ` pinskia at gcc dot gnu dot org
2006-01-21  4:31 ` mmitchel at gcc dot gnu dot org
2006-01-25  6:32 ` mmitchel at gcc dot gnu dot org
2006-02-13 17:13 ` bangerth at dealii dot org
2006-02-24  0:28 ` mmitchel at gcc dot gnu dot org
2006-05-25  2:47 ` [Bug c++/25868] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
2006-08-28  5:19 ` [Bug c++/25868] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-08-28  5:22 ` pinskia at gcc dot gnu dot org
2006-08-28 22:14 ` janis at gcc dot gnu dot org
2006-10-18  9:19 ` [Bug c++/25868] [4.0 " rguenth at gcc dot gnu dot org
2007-02-13  2:59 ` 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).