public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/106839] New: Library traits need to handle array of incomplete type with unknown bound
@ 2022-09-05 17:21 redi at gcc dot gnu.org
2022-09-05 17:29 ` [Bug libstdc++/106839] " redi at gcc dot gnu.org
2022-09-05 17:35 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-09-05 17:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106839
Bug ID: 106839
Summary: Library traits need to handle array of incomplete type
with unknown bound
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
This should be valid:
#include <type_traits>
struct Inc;
static_assert( ! std::is_empty_v<Inc[]> );
static_assert( ! std::is_pod_v<Inc[]> );
static_assert( ! std::is_polymorphic_v<Inc[]> );
static_assert( ! std::is_abstract_v<Inc[]> );
However, before r13-25 the front-end rejected it. For the release branches, the
library needs to workaround this.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/106839] Library traits need to handle array of incomplete type with unknown bound
2022-09-05 17:21 [Bug libstdc++/106839] New: Library traits need to handle array of incomplete type with unknown bound redi at gcc dot gnu.org
@ 2022-09-05 17:29 ` redi at gcc dot gnu.org
2022-09-05 17:35 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-09-05 17:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106839
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Actually is_pod_v<Inc[]> really should be ill-formed, so r13-25 was wrong to
allow that.
But is_final_v<Inc[]> should be valid, and is rejected by gcc-11 and gcc-12, so
the library needs to handle that.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/106839] Library traits need to handle array of incomplete type with unknown bound
2022-09-05 17:21 [Bug libstdc++/106839] New: Library traits need to handle array of incomplete type with unknown bound redi at gcc dot gnu.org
2022-09-05 17:29 ` [Bug libstdc++/106839] " redi at gcc dot gnu.org
@ 2022-09-05 17:35 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-09-05 17:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106839
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
As noted in PR 106838 the library needs to guard use of
__has_virtual_destructor so it's only used with non-union class types. This
applies to trunk as well.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-05 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 17:21 [Bug libstdc++/106839] New: Library traits need to handle array of incomplete type with unknown bound redi at gcc dot gnu.org
2022-09-05 17:29 ` [Bug libstdc++/106839] " redi at gcc dot gnu.org
2022-09-05 17:35 ` redi at gcc dot gnu.org
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).