On 03/22/2012 07:28 PM, Jason Merrill wrote:
On 03/22/2012 12:58 PM, Paolo Carlini wrote:
Anyway, I also think not calling literal_type_p from check_field_decls
if the type is incomplete is pretty ugly, but I'm not sure which is the
best way to make progress
I guess that's OK. Just add a commen
On 03/22/2012 12:58 PM, Paolo Carlini wrote:
Anyway, I also think not calling literal_type_p from check_field_decls
if the type is incomplete is pretty ugly, but I'm not sure which is the
best way to make progress
I guess that's OK. Just add a comment explaining that we'll get an
error later.
On Thu, Mar 22, 2012 at 11:58 AM, Paolo Carlini
wrote:
> On 03/22/2012 03:49 PM, Jason Merrill wrote:
>>
>> It's ill-formed to have a field with incomplete type. The best thing
>> would be to complain about that before we get to literal_type_p so that
>> errorcount is set, if that's not too compl
On 03/22/2012 03:49 PM, Jason Merrill wrote:
It's ill-formed to have a field with incomplete type. The best thing
would be to complain about that before we get to literal_type_p so
that errorcount is set, if that's not too complicated.
Agreed. The problem is that if we just change check_field_d
It's ill-formed to have a field with incomplete type. The best thing
would be to complain about that before we get to literal_type_p so that
errorcount is set, if that's not too complicated.
Jason
... this simple also passes testing.
Paolo.
/cp
2012-03-20 Paolo Carlini
PR c++/52487
* class.c (check_field_decls): Call literal_type_p only
on complete types.
/testsuite
2012-03-20 Paolo Carlini
PR c++/52487
* g++.dg/cpp0x/l
On 03/20/2012 08:22 PM, Jason Merrill wrote:
That assert is there to make sure that we don't try to test for
literality of an incomplete type. We should check for completeness
before trying to check for literality.
You mean, in the relevant caller, here in check_field_decls:
/* If at le
That assert is there to make sure that we don't try to test for
literality of an incomplete type. We should check for completeness
before trying to check for literality.
Jason
Hi,
this regression is about literal_type_p ICEing for types which cannot be
completed. Indeed, for the testcase, complete_type cannot complete the
type but doesn't error out either, just returns the type as-is, and the
gcc_assert triggers. We could imagine handling such types in the caller
-