http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53573
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-06-05 10:02:25 UTC --- (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.