C++ Patch Ping
Nathan Sidwell
nathan@acm.org
Thu Dec 15 12:48:00 GMT 2016
On 12/15/2016 07:26 AM, Jakub Jelinek wrote:
> I don't think so. complete_type (error_mark_node) returns error_mark_node,
> and COMPLETE_TYPE_P (error_mark_node) is invalid (should fail TYPE_CHECK in
> checking compiler).
>
> I can write it as
> inst = complete_type (inst);
> if (inst == error_mark_node || !COMPLETE_TYPE_P (inst))
> return NULL_TREE;
that's probably better, because complete_type can return error_mark_node
if 'something goes horribly wrong'
--
Nathan Sidwell
More information about the Gcc-patches
mailing list