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 33101


Hi,

On 06/12/2014 11:20 PM, Jason Merrill wrote:
On 06/12/2014 03:14 PM, Paolo Carlini wrote:
... in terms of code proper, the below is much better, IMHO. Assuming,
as I understand, we have no reason to call the rather heavy same_type_p
when we already know that VOID_TYPE_P (type) is true...

same_type_p is not so heavy since it just compares TYPE_CANONICAL, but I wonder why we don't use == for the normal case, and then typedef_variant_p to diagnose a typedef.
Ah great, I was missing a number of details here (yesterday realized myself the big one, TYPE_CANONICAL, but something still seemed weird with a full same_type_p after VOID_TYPE_P...). There is a minor difference from the user point of view that we talk about typedef-name also in case of more than one parameter - not even C allows that ;) - but I think it's fine, considering the code simplification.

Thanks!
Paolo.

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

Attachment: patch_33101_3
Description: Text document


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