[Bug c++/37804] friend declaration leaks into global scope at template instantiation

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Dec 30 11:53:00 GMT 2008



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-12-30 11:52 -------
14.6.5 [temp.inject]

suggests that this is valid.  EDG doesn't agree with that in strict-ansi mode.

t2.C(9): error: identifier "B" is undefined
  B some_function();  // B should not be declared here
  ^

compilation aborted for t2.C (code 2)

(testcase from comment #1)


-- 


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



More information about the Gcc-bugs mailing list