This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/37085] New: global friends in classes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]