This is the mail archive of the gcc@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]

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)?




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