This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c++/90532 Ensure __is_constructible(T[]) is false
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, Jason Merrill <jason at redhat dot com>
- Date: Mon, 20 May 2019 12:33:42 +0100
- Subject: Re: [PATCH] PR c++/90532 Ensure __is_constructible(T[]) is false
- References: <20190520104308.GA2178@redhat.com> <ccd9eab0-f6ec-7d61-0889-08f54909303b@acm.org>
On 20/05/19 07:29 -0400, Nathan Sidwell wrote:
On 5/20/19 6:43 AM, Jonathan Wakely wrote:
An array of an unknown bound is an incomplete type, so no object of such
a type can be constructed. This means __is_constructible should always
be false for an array of unknown bound.
This patch also changes the std::is_default_constructible trait to use
std::is_constructible, which now gives the right answer for arrays of
unknown bound.
gcc/cp:
PR c++/90532 Ensure __is_constructible(T[]) is false
* method.c (is_xible_helper): Return error_mark_node for construction
of an array of unknown bound.
ok, thanks
I noticed a missing space here, so I fixed that before committing:
- else if (TREE_CODE(to) == ARRAY_TYPE && !TYPE_DOMAIN (to))
+ else if (TREE_CODE (to) == ARRAY_TYPE && !TYPE_DOMAIN (to))