public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Carlini <pcarlini@suse.de>
To: Mark Mitchell <mark@codesourcery.com>
Cc: Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: Renaming IS_AGGR_TYPE & co
Date: Tue, 11 Mar 2008 22:22:00 -0000	[thread overview]
Message-ID: <47D705FA.7090104@suse.de> (raw)
In-Reply-To: <47D6DC29.6020301@codesourcery.com>

Hi Mark,
>> -  else if (! is_aggr_type (base, 1))
>> +  else if (TREE_CODE (base) != TYPENAME_TYPE
>> +          && TREE_CODE (base) != TEMPLATE_TYPE_PARM
>> +          && TREE_CODE (base) != BOUND_TEMPLATE_TEMPLATE_PARM
>> +          && ! is_class_type (base, 1))
>>      result = NULL_TREE;
>>
>> allows the testsuite to pass...
> I think that in this case you want MAYBE_CLASS_TYPE_P.
>
> Here, the compiler is checking to see if the type is a valid base 
> class type.  If it's a template type parameter, it *might* be a class 
> type -- we just don't know yet.  So, we want to accept it.
Ok, thanks, now I see the logic pretty clearly. Note however, that the 
current is_aggr_type (would be is_class_type), beyond MAYBE_CLASS_TYPE_P 
emits *error messages*, which currently wrongly talk about 
""aggregate"". I understand that in this case only in order to preserve 
and improve the current behavior I should open code a check of 
MAYBE_CLASS_TYPE_P and an error message talking about... what?!?... just 
"class type" would be Ok for the error message?

Paolo.

  reply	other threads:[~2008-03-11 22:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-07 16:49 Paolo Carlini
2008-03-09 21:17 ` Mark Mitchell
2008-03-10 11:11   ` Paolo Carlini
2008-03-10 15:24     ` Mark Mitchell
2008-03-10 16:13       ` Paolo Carlini
2008-03-10 19:10         ` Mark Mitchell
2008-03-10 19:29           ` Paolo Carlini
2008-03-10 20:28             ` Paolo Carlini
2008-03-11 19:50               ` Mark Mitchell
2008-03-11 22:22                 ` Paolo Carlini [this message]
2008-03-12  1:09                   ` Mark Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47D705FA.7090104@suse.de \
    --to=pcarlini@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).