This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37085] New: global friends in classes
- From: "mrs at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2008 21:35:03 -0000
- Subject: [Bug c++/37085] New: global friends in classes
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Global friend inside a class regressed.
$ cat /tmp/t.cc
class test1 {
public:
friend void newtest1(int x) {
}
};
int main(int argc, char *argv[]) {
newtest1(5);
}
$ ./xgcc -B./ /tmp/t.cc -c
/tmp/t.cc: In function ?int main(int, char**)?:
/tmp/t.cc:8: error: ?newtest1? was not declared in this scope
GNU C++ (GCC) version 4.4.0 20080811 (experimental) [trunk revision 138965]
(i686-apple-darwin9)
This worked just fine in gcc 4.0.1.
radr://6135771
--
Summary: global friends in classes
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mrs at apple dot com
GCC host triplet: i686-apple-darwin9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37085