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++/59210] New: decltype incorrectly accepted as non-first element of nested-name-specifier


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59210

            Bug ID: 59210
           Summary: decltype incorrectly accepted as non-first element of
                    nested-name-specifier
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jhs at edg dot com

The grammar for nested-name-specifier only allows decltype to be the first
component of the name, so A::decltype should not be accepted.

struct A {
        struct B { int i; };
        B b;
};


int main() {
  A a;
  a.b.A::decltype(a.b)::i;
}


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