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 PR33122, wrong types with pointer-plus


On 8/21/07, Richard Guenther <rguenther@suse.de> wrote:
> -       /* index +p PTR -> PTR +p index */
> -       if (POINTER_TYPE_P (TREE_TYPE (arg1))
> -         && INTEGRAL_TYPE_P (TREE_TYPE (arg0)))
> -         return fold_build2 (POINTER_PLUS_EXPR, type,
> -                           fold_convert (type, arg1), fold_convert (sizetype, arg0));

Wait how is this wrong again?

Type will always be pointer, if it is not then that is a bug as
pointer plus will only work with resulting point types.

This seems like a bug in the front-end producing the wrong types in
the first place.  Can you please revert this patch until bootstrap was
fixed for libstdc++ because you could not have tested it?

Thanks,
Andrew Pinski


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