https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65890
Bug ID: 65890 Summary: [C++03]sizeof(qualified-id) accepted when the operand denotes a non-static member Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: frankhb1989 at gmail dot com Target Milestone: --- Case: struct Tag { int m; }; int main() { sizeof(&(Tag::m)); } According to ISO C++03 5.1/10, this is not well-formed. (But C++11 should work.) However, G++ 4.9.1 wrongly accepted it even with -std=c++03 -pedantic-errors. (I have no GCC 5 distro so have not tested it.)