This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 50732


On 10/14/2011 09:08 PM, Jason Merrill wrote:
How about using complete_type_or_else?
The CPTK_IS_BASE_OF case becomes much simpler indeed, thanks. For the unary traits, though, I don't see an advantage in using it, because in some cases in check_trait_type we don't want to error out even when complete_type_or_else would. Unless we can check whether we are dealing with an array of unknown bound *before* completing the type? That is:

  if (TREE_CODE (type) == ARRAY_TYPE && !TYPE_DOMAIN (type)
&& COMPLETE_TYPE_P (TREE_TYPE (type)))

is the outcome always the same before and after trying to complete (type)?

Thanks,
Paolo.

//////////////////////

Attachment: patch_50732_2
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]