------- Comment #8 from ebotcazou at gcc dot gnu dot org 2010-04-08 10:48
-------
> I did want to remove that optimization at some point but people complained
> that it was highly useful (the C++ FE can still set TYPE_PRECISION
> accordingly if it wants to, but TYPE_MIN/MAX_VALUE cannot really be trusted
> in the middle-end as conversions between integer types of same precision
> but different TYPE_MIN/MAX_VALUE are 1) useless and 2) do not produce code
> to truncate the values).
We had the exact same problem in Ada until 4.4, it has been solved by setting
TYPE_MIN/MAX_VALUE to their canonical values...
> I also believe that the TYPE_MIN/MAX_VALUE on enums might be needed for
> proper debug information.
...and this one by providing a get_subrange_bounds lang hook.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680