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 PR46745


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


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