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

Re: [patch] Fix PR43065: Insert bounds on pointer type parameters


On Fri, Mar 5, 2010 at 3:45 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> Hi,
>
> to solve http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43065 we
> have to insert in the context of the scop the minimal value of a
> pointer type parameter. ÂI used for this the min and max values
> of the unsigned type, like this:
>
> + Âelse if (POINTER_TYPE_P (type))
> + Â Â{
> + Â Â Âlb = TYPE_MIN_VALUE (unsigned_type_node);
> + Â Â Âub = TYPE_MAX_VALUE (unsigned_type_node);
> + Â Â}
>
> Richi, does this look good to you?

unsigned_type_node is most likely incorrect.  You most likely want
sizetype instead.

Thanks,
Andrew Pinski


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