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: Handling non-constant bounds in extract_range_from_cond


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



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