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]

Re: Pointers Extend Unsigned Question


> This is an extract of a trivial function returning a pointer,
> where the value is (ptr) (HOST_WIDE_INT) -1.  (Don't say
> "don't do that": it's from gcc/calls.c!)

If the value is compared against (ptr) (HOST_WIDE_INT) -1 ,
and the compiler does the extensions consistently, this should
work regardless of whether it zero extends or sign extends.

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