public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64489] New: A simple struct wrapping a const int is not trivially copyable
@ 2015-01-04 19:00 ville.voutilainen at gmail dot com
2015-01-05 14:44 ` [Bug c++/64489] " ville.voutilainen at gmail dot com
2015-01-06 23:27 ` ville.voutilainen at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: ville.voutilainen at gmail dot com @ 2015-01-04 19:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64489
Bug ID: 64489
Summary: A simple struct wrapping a const int is not trivially
copyable
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
CC: jason at redhat dot com
struct X {const int val;};
static_assert(__is_trivially_copyable(const int), "");
static_assert(__is_trivially_copyable(X), "");
The second assertion fails. It shouldn't, because const int has
no non-trivial copy/move constructors or assignment operators, and
the first assertion succeeds. Clang accepts the code.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/64489] A simple struct wrapping a const int is not trivially copyable
2015-01-04 19:00 [Bug c++/64489] New: A simple struct wrapping a const int is not trivially copyable ville.voutilainen at gmail dot com
@ 2015-01-05 14:44 ` ville.voutilainen at gmail dot com
2015-01-06 23:27 ` ville.voutilainen at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: ville.voutilainen at gmail dot com @ 2015-01-05 14:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64489
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ville.voutilainen at gmail dot com
--- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
I'll take a look at fixing this. :)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/64489] A simple struct wrapping a const int is not trivially copyable
2015-01-04 19:00 [Bug c++/64489] New: A simple struct wrapping a const int is not trivially copyable ville.voutilainen at gmail dot com
2015-01-05 14:44 ` [Bug c++/64489] " ville.voutilainen at gmail dot com
@ 2015-01-06 23:27 ` ville.voutilainen at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: ville.voutilainen at gmail dot com @ 2015-01-06 23:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64489
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Fixed, then.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-06 23:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-04 19:00 [Bug c++/64489] New: A simple struct wrapping a const int is not trivially copyable ville.voutilainen at gmail dot com
2015-01-05 14:44 ` [Bug c++/64489] " ville.voutilainen at gmail dot com
2015-01-06 23:27 ` ville.voutilainen 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).