public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54158] New: Silently accepts sizeof to non-static member without object in C++03 mode
@ 2012-08-02  2:41 ai.azuma at gmail dot com
  2012-08-02  9:42 ` [Bug c++/54158] [4.6, 4.7, 4.8 Regression] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ai.azuma at gmail dot com @ 2012-08-02  2:41 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: ai.azuma@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'.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-08-03  8:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-02  2:41 [Bug c++/54158] New: Silently accepts sizeof to non-static member without object in C++03 mode ai.azuma at gmail dot com
2012-08-02  9:42 ` [Bug c++/54158] [4.6, 4.7, 4.8 Regression] " redi at gcc dot gnu.org
2012-08-02  9:45 ` redi at gcc dot gnu.org
2012-08-02 10:45 ` paolo.carlini at oracle dot com
2012-08-02 10:51 ` paolo.carlini at oracle dot com
2012-08-03  2:06 ` ai.azuma at gmail dot com
2012-08-03  7:57 ` redi at gcc dot gnu.org
2012-08-03  8:21 ` ai.azuma at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).