This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37558] New: rev 140120 changes the accessibility of a friend decl.
- From: "espindola at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2008 12:32:21 -0000
- Subject: [Bug c++/37558] New: rev 140120 changes the accessibility of a friend decl.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Gcc 4.4 used to accept the program
---------------------------------------
class Foo {
friend class Bar;
friend void func(const class Bar*);
};
--------------------------------------
since 140120 it does not.
Simon found the following:
gcc 2.95.3, 3.4.5 and icc accept it. Previous versions of 4.4 reject it.
The standard says
11.4-7: "A name nominated by a friend declaration shall be accessible in the
scope of the class containing the friend declaration."..
I am not sure if we should accept or reject it, but we should have a testcase
once we decide.
--
Summary: rev 140120 changes the accessibility of a friend decl.
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: espindola at google dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37558