This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/22363] Problems with friend function injection and destructor


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-30 05:12 -------
For the testcase in comment #2, on the mainline, we get a different error message:

t.cc:2: warning: friend declaration ?void foo(T*)? declares a non-template function
t.cc:2: warning: (if this is not what you intended, make sure the function template has already been 
declared and add <> after the function name here) -Wno-non-template-friend disables this warning
t.cc: In function ?void bar() [with T = X<int>]?:
t.cc:10:   instantiated from ?X<T>::X() [with T = X<int>]?
t.cc:13:   instantiated from here
t.cc:5: error: ?foo? was not declared in this scope

This seems better as friend don't intject the declation at all.

-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]