This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR46745
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Dec 2010 16:23:52 +0000 (UTC)
- Subject: Re: [PATCH] Fix PR46745
- References: <alpine.LNX.2.00.1012011510340.23074@zhemvz.fhfr.qr>
On Wed, 1 Dec 2010, Richard Guenther wrote:
> This teaches the C pretty printer about MEM_REF. I'm not sure how
> to best present the case with a non-constant offset to the user
> though (the patch prints *(p+byte offset)), printing a byte offset
> isn't equivalent to C semantics when the pointed to type of p isn't
> of size 1. I thought of printing an ellipsis in the non-constant
> offset case, *(...). Or going the full way and printing a cast,
> *(TREE_TYPE(mem) *)((char *)p + byte offset). But I'm not sure
> how fancy we should try to be for the late diagnostic cases.
>
> Joseph?
The patch is OK, though a cast is probably a better representation.
--
Joseph S. Myers
joseph@codesourcery.com