This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24090] New: gcc 4.1.0 20050926 - friends not visible outside class
- From: "jaffe at broad dot mit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Sep 2005 20:00:15 -0000
- Subject: [Bug c++/24090] New: gcc 4.1.0 20050926 - friends not visible outside class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If test.cc is:
class F {
friend void global_f() {}
};
class G {
void member_of_g() { global_f(); }
};
then gcc -c test.cc yields
test.cc: In member function 'void G::member_of_g()':
test.cc:5: error: 'global_f' was not declared in this scope
which appears to be wrong.
% gcc -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ../configure --prefix=/wga1/gcc --enable-checking=release
Thread model: posix
gcc version 4.1.0 20050926 (experimental)
--
Summary: gcc 4.1.0 20050926 - friends not visible outside class
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jaffe at broad dot mit dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-unknown-linux-gnu
GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24090