This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line
- From: "yuri at tsoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2008 22:22:37 -0000
- Subject: [Bug c++/35578] New: Error about misplaced 'friend' word is issued on a wrong line
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When I compile the code below I get:
x.C:3: error: 'friend' used outside of class
And 'friend' word is on the line #5.
=== code begins ===
int i() {
return (0);
} /*here an error is reported*/
friend void x() {
}
--
Summary: Error about misplaced 'friend' word is issued on a wrong
line
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yuri at tsoft dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35578