This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Handling non-constant bounds in extract_range_from_cond
- From: Jeffrey A Law <law at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Nov 2004 15:44:20 -0700
- Subject: Re: Handling non-constant bounds in extract_range_from_cond
- Organization: Red Hat, Inc
- References: <10411300307.AA03673@vlsi1.ultra.nyu.edu>
- Reply-to: law at redhat dot com
On Mon, 2004-11-29 at 22:07 -0500, Richard Kenner wrote:
> As you say, it may not be appropriate for Ada, but it is appropriate
> for C and possibly other languages.
>
> As far as I know, C doesn't use subtypes for objects. They are only
> used in C except as representations of array bounds, so this never
> comes up. What other languages use them?
I thought they were used for enumerations.
>
> It seems to me that the semantics of this stuff really needs to be for
> the object to be converted into the base type, then compared to the
> range of the subtype -- before we get to the gimplification phase.
>
> As I said, the problem with that is that these conversions tend to be
> stripped off by the optimizers. I suppose we could view those removals
> as bugs ...
I would certainly consider that a bug.
jeff