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++/49155] New: [C++0x] decltype-specifier not supported as base type specifier


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

           Summary: [C++0x] decltype-specifier not supported as base type
                    specifier
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com
                CC: jason@redhat.com


gcc 4.7.0 20110521 (experimental) in C++0x mode rejects the following code:

//---
struct A{};

A foo();

struct B : decltype(foo()) {}; // #
//---

"error: expected class-name before 'decltype'
 error: expected '{' before 'decltype'
 error: expected unqualified-id before '{' token"

This code should be accepted, a decltype-specifier is now valid in
base-specifier-list as of FDIS, Clause 10.


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