This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Stickiness of TYPE_MIN_VALUE/TYPE_MAX_VALUE
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 30 May 2005 21:59:12 +0200
- Subject: Stickiness of TYPE_MIN_VALUE/TYPE_MAX_VALUE
How sticky are TYPE_MIN_VALUE and TYPE_MAX_VALUE? Is it possible to
get rid of their effect using a NOP_EXPR, CONVERT_EXPR or
VIEW_CONVERT_EXPR?
If this is impossible, the Ada front end should probably stop setting
these fields because it assumes that it can use values outside that
range:
<http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gnat_ugn_unw/Validity-Checking.html>
Current mainline does not optimize array range checks away (even with
-ftree-vrp), but I'm not sure if this is just a missed optimization
opportunity as far as the optimizers are concerned, or something which
is guaranteed to work in the future.