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

* [Bug c++/41141] Support for C++0x standard layout and trivial types is broken
  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 ` redi at gcc dot gnu dot org
  2009-08-21 16:35 ` [Bug web/41141] " paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu dot org @ 2009-08-21 16:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from redi at gcc dot gnu dot org  2009-08-21 16:30 -------
I think the docs for 4.4 might be lying, or maybe it's just std::is_pod that
doesn't work correctly.

It works with 4.5, probably since bug 37907 was fixed.


-- 


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


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

* [Bug web/41141] Support for C++0x standard layout and trivial types is broken
  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 ` paolo dot carlini at oracle dot com
  2009-08-21 16:40 ` redi at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-08-21 16:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2009-08-21 16:35 -------
Right, this is just a bug in the 4.4 cxx0x_status.html, I'll fix it
momentarily.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |paolo dot carlini at oracle
                   |dot org                     |dot com
             Status|UNCONFIRMED                 |ASSIGNED
          Component|c++                         |web
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-21 16:35:23
               date|                            |


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


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

* [Bug web/41141] Support for C++0x standard layout and trivial types is broken
  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
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu dot org @ 2009-08-21 16:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from redi at gcc dot gnu dot org  2009-08-21 16:39 -------
Does the C++0x status in the libstdc++ manual also need updating?  it says
is_system_layout is missing - I think that should be is_standard_layout, but
it's not missing on trunk now anyway.


-- 


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


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

* [Bug web/41141] Support for C++0x standard layout and trivial types is broken
  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
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-08-21 16:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from paolo dot carlini at oracle dot com  2009-08-21 16:42 -------
Fixed. Jonathan, probably, let's deal with the separately.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug web/41141] Support for C++0x standard layout and trivial types is broken
  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
                   ` (3 preceding siblings ...)
  2009-08-21 16:42 ` paolo dot carlini at oracle dot com
@ 2009-08-21 17:05 ` paolo dot carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-08-21 17:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from paolo dot carlini at oracle dot com  2009-08-21 17:05 -------
Jon, I had a look and apparently the xml file in the v3 doc directory needs
*many* more fixes/updates besides that one. If you can find the time, a more
comprehensive patch would be really welcome, otherwise, I'll try to do it, at
some point.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu dot org


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).