public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41141]  New: Support for C++0x standard layout and trivial types is broken
@ 2009-08-21 16:22 eric dot niebler at gmail dot com
  2009-08-21 16:31 ` [Bug c++/41141] " redi at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: eric dot niebler at gmail dot com @ 2009-08-21 16:22 UTC (permalink / raw)
  To: gcc-bugs

GCC is claiming support for Standard Layout Types
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm) in its 4.4
series. However, the following example, taken directly from n2342, fails to
compile (with either --std=gnu++0x or --std=c++0x):

{{{
 #include <type_traits>

 struct B
 {
   int n;
   B() = default;
   B(int n_) : n(n_) {}
 };

 static_assert(std::is_pod<B>::value, "B is not POD!");

 int main() {}
}}}

I have checked with Beman Dawes, the author of n2342, and he confirms that the
code should compile under a conforming c++0x compiler.


-- 
           Summary: Support for C++0x standard layout and trivial types is
                    broken
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eric dot niebler at gmail dot com


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


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

end of thread, other threads:[~2009-08-21 17:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-21 16:22 [Bug c++/41141] New: Support for C++0x standard layout and trivial types is broken eric dot niebler at gmail dot com
2009-08-21 16:31 ` [Bug c++/41141] " redi at gcc dot gnu dot org
2009-08-21 16:35 ` [Bug web/41141] " paolo dot carlini at oracle dot com
2009-08-21 16:40 ` redi at gcc dot gnu dot org
2009-08-21 16:42 ` paolo dot carlini at oracle dot com
2009-08-21 17:05 ` paolo dot carlini at oracle 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).