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

Reply via email to