[Bug c++/53573] template type dependent name resolution broken

keean@fry-it.com gcc-bugzilla@gcc.gnu.org
Tue Jun 5 10:15:00 GMT 2012


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

--- Comment #8 from Keean Schupke <keean@fry-it.com> 2012-06-05 10:15:18 UTC ---
(In reply to comment #7)
Have a read of the C++ standard, the example given in:

N3242=11-0012 14.6 Name Resolution: paragraph 10

Which I have pasted above into comment #4 and the extract from C++ Special
Edition (Technicalities C.13.8.3) which is pasted in comment #3.

How do you interpret these two? 


> (In reply to comment #6)
> > The suggested work around in the error message 'adding -fpermissive' to
> > gcc-4.7.0 does not fix the problem as suggested by the error message. This
> > would suggest the compiler is not displaying the correct error message for the
> > problem.
> > 
> > g++ -fpermissive test.cpp
> > 
> > Still generates:
> > 
> > test.cpp: In instantiation of ‘T f(T) [with T = int]’:
> > test.cpp:27:9:   required from here
> > test.cpp:18:12: error: ‘g’ was not declared in this scope, and no declarations
> > were found by argument-dependent lookup at the point of instantiation
> > [-fpermissive]
> > test.cpp:21:5: note: ‘int g(int)’ declared here, later in the translation unit
> > 
> 
> With GCC 4.8 revision 187148, -fpermissive generates a warning as it should.
> However, -fpermissive is not meant to fix anything, it is just a work-around to
> make non-standard code compile.
> 
> I am not sure if this is a bug or not, so I am not touching the status.



More information about the Gcc-bugs mailing list