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

             Bug #: 54158
           Summary: Silently accepts sizeof to non-static member without
                    object in C++03 mode
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ai.az...@gmail.com


The following code is not well-formed in C++03.

/////////////////////////////
struct Class
{
  int Member;
};

int i[sizeof(Class::Member)];
/////////////////////////////

However, GCC 4.6.4 20120727, 4.7.2 20120728 and 4.8.0 20120729 accept this code
without any warning, even with `-std=c++03', `-Wall' and `-pedantic'.

Reply via email to