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.