public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenther@suse.de>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Remove VRPs use of TYPE_MIN/MAX_VALUE
Date: Mon, 11 Apr 2011 15:43:00 -0000	[thread overview]
Message-ID: <alpine.LNX.2.00.1104111740480.810@zhemvz.fhfr.qr> (raw)
In-Reply-To: <201104111719.24346.ebotcazou@adacore.com>

On Mon, 11 Apr 2011, Eric Botcazou wrote:

> > Such types are still there for enumeral type kinds.  Also the C family
> > frontends leak arithmetic in array TYPE_DOMAIN types.
> 
> The arithmetic needs to be fixed to use the base type instead (i.e. TREE_TYPE 
> of type, which is guaranteed to be sizetype for TYPE_DOMAIN types).
> 
> > I don't see how we can do this for ENUM types.  We use the
> > TYPE_MIN/MAX_VALUEs for debug information.
> 
> Like Ada. There is a hook (get_subrange_bounds), see subrange_type_for_debug_p.

Hm, I see.  Nothing I want to change at this moment though - for C
and C++ this kind of changes would leak into their internal ASTs :/

> > I tried to assert this for INTEGER_TYPEs only, but as noted above the
> > C family leaks TYPE_DOMAIN arithmetic.
> 
> Gigi used to do so as well, now it always uses the base type.

Yes, I know - it's good that at least Ada behaves well there now.

Is your concern the cost of calling lower/upper_bound_in_type?

Richard.

  reply	other threads:[~2011-04-11 15:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11 11:17 Richard Guenther
2011-04-11 13:28 ` Eric Botcazou
2011-04-11 14:09   ` Richard Guenther
2011-04-11 15:25     ` Eric Botcazou
2011-04-11 15:43       ` Richard Guenther [this message]
2011-04-11 21:37         ` Eric Botcazou

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=alpine.LNX.2.00.1104111740480.810@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).