Skip to content

clang accepts friend that g++/Comeau reject #12361

Open
@llvmbot

Description

@llvmbot
Bugzilla Link 11989
Version 3.0
OS Linux
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@tkremenek

Extended Description

This code:

 class D {
     class E{
         class F{};
         friend  void foo1(D::E::F& q);
         };
     friend  void foo1(D::E::F& q);
     };

 void foo1(D::E::F& q) {}

 int main(int argc, char** argv) { return 0; }

is accepted by clang but rejected by g++ and Comeau. Gnu says they are right to reject (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52212), so I'm filing it with you. One of you guys is right; perhaps you can get together and agree who it is?

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepts-invalidbugzillaIssues migrated from bugzillac++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partydiverges-from:gccDoes the clang frontend diverge from gcc on this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions