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

Reply via email to