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++/66548] New: Invalid class member access expression in decltype sometimes accepted


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66548

            Bug ID: 66548
           Summary: Invalid class member access expression in decltype
                    sometimes accepted
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

The following code is accepted by GCC 5.1 and 6.0.0 20150615 (experimental),
even though it is plainly invalid:

struct Meow {};

int main(){
    decltype(Meow.purr()) d;
}

GCC 4.9.2 correctly rejects this code.


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