Bug 26904

Summary: A template named the same as its member confuses lookup through inheritance
Product: gcc Reporter: Dave Abrahams <dave>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: fang, gcc-bugs, msebor
Priority: P3    
Version: 4.0.2   
Target Milestone: ---   
Host: Target:
Build: Known to work: 4.9.3, 5.3.0, 6.1.0
Known to fail: Last reconfirmed:
Attachments: Preprocessed C++ source

Description Dave Abrahams 2006-03-28 15:16:03 UTC
The enclosed demonstrates.  define either SUPPRESS_BUG or SUPPRESS_BUG2 to show that either not using inheritance or using a template called typer instead of type will suppress the bug.
Comment 1 Dave Abrahams 2006-03-28 15:16:58 UTC
Created attachment 11136 [details]
Preprocessed C++ source
Comment 2 Andrew Pinski 2006-05-01 02:28:43 UTC
Do you have a shorter testcase?  It is hard to figure out if this is valid code (though it does look like it is).
Comment 3 Dave Abrahams 2006-05-01 02:43:29 UTC
I'm afraid I don't.
Comment 4 Martin Sebor 2016-05-07 00:55:57 UTC
The test case compiles with today's trunk (7.0) as well all supported versions (all the way back to 4.9.3).  Resolving as Fixed.
Comment 5 Jonathan Wakely 2016-05-09 09:41:24 UTC
For the record, it seems to have first been fixed for GCC 4.5