This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
TYPE_MIN_VALUE and pointer types
- From: Paul Schlie <schlie at comcast dot net>
- To: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 17 Feb 2005 09:08:26 -0500
- Subject: TYPE_MIN_VALUE and pointer types
> Richard Guenther wrote:
> I'm getting an ICE in
> this is because I'm feeding int_fits_type_p a (constant) pointer type:
- Wonder if because it was assumed that a pointer may most typically never
numerically "fit" an (signed) int without overflow, but as I think you're
relying on the numerical overflow to get the correct sign result when
casting to an equivalent sized integer, maybe that's what you want to
assure, i.e. assure that you do cast to an equivalent sized integer type.
(although int_fits_type_p should likely handle pointer arguments as well
for completeness, even if not likely not applicable to your purpose)?