public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65399] New: error: invalid use of non-static data member
@ 2015-03-12 11:11 dcb314 at hotmail dot com
  2015-03-12 12:57 ` [Bug c++/65399] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dcb314 at hotmail dot com @ 2015-03-12 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65399
           Summary: error: invalid use of non-static data member
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com

I've just had a go at compiling gcc trunk with clang.
It says

/usr/bin/../lib/gcc/x86_64-redhat-linux/5.0.0/../../../../include/c++/5.0.0/stdexcept:83:28:
error: invalid use of non-static data member '_M_s'

It seems for the attached code, clang and gcc don't agree.

typedef unsigned long size_t;

  struct __sso_string
  {
    struct __str
    {
      const char* _M_p;
      size_t _M_string_length;
      char _M_local_buf[16];
    };

    union {
      __str _M_s;
      char _M_bytes[sizeof(_M_s)];
    };
  };


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

end of thread, other threads:[~2015-03-12 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 11:11 [Bug c++/65399] New: error: invalid use of non-static data member dcb314 at hotmail dot com
2015-03-12 12:57 ` [Bug c++/65399] " redi at gcc dot gnu.org
2015-03-12 13:02 ` redi at gcc dot gnu.org
2015-03-12 13:37 ` dcb314 at hotmail 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).