https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804
Andrew Pinski changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804
Jonathan Wakely changed:
What|Removed |Added
Keywords|rejects-valid |
Target|x86_64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804
Bug 37804 depends on bug 31336, which changed state.
Bug 31336 Summary: template friends and Koenig lookup
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31336
What|Removed |Added
-
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804
Jonathan Wakely changed:
What|Removed |Added
Keywords||rejects-valid
--- Comment #8 from Jona
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804
--- Comment #7 from Ilya Konstantinov ---
Whoever has permission to change, please add 'rejects-valid' as per my example
in the previous comment.
P.S. this issue reproduces in g++ 4.8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804
Ilya Konstantinov changed:
What|Removed |Added
CC||ilya.konstantinov at gmail dot
com
--- Comment #5 from jason at gcc dot gnu dot org 2009-01-15 23:07 ---
7.3.1.2: If a friend declaration in a non-local class first declares a class or
function the friend class or function is a member of the innermost enclosing
namespace. The name of the friend is not found by unqualified
--- 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
^
compilatio
--- Comment #3 from rguenth at gcc dot gnu dot org 2008-10-11 18:46 ---
Related to PR37775, PR34827 and PR31336. (search for accepts-invalid and
'friend')
Seems like friend declarations are not an uncommon source for problems...
--
rguenth at gcc dot gnu dot org changed:
--- Comment #2 from pinskia at gmail dot com 2008-10-11 17:05 ---
Subject: Re: New: Nested type leaks to global scope
Sent from my iPhone
On Oct 11, 2008, at 5:28 AM, "therealfroggey at gmail dot com"
<[EMAIL PROTECTED]
> wrote:
> GCC versions used:
> gcc version 4.1.2
> gcc ver
--- Comment #1 from rguenth at gcc dot gnu dot org 2008-10-11 13:07 ---
Confirmed. The friend declaration seems to inject Internal_B into the global
namespace at the point of instantiating the template A.
Reduced testcase:
template
struct A
{
friend class B;
};
A a; // here we inj
11 matches
Mail list logo