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: [C PATCH] -Wsizeof-pointer-memaccess warning


On Thu, 16 Aug 2012, Jakub Jelinek wrote:

> Hi!
> 
> On Wed, Aug 15, 2012 at 04:29:55PM +0000, Joseph S. Myers wrote:
> > On Wed, 15 Aug 2012, Jakub Jelinek wrote:
> > 
> > > I was mainly interested in whether such an approach is acceptable, or
> > > whether I need to stop evaluating sizeof right away, create SIZEOF_EXPR
> > > and only fold it during fully_fold*.  I've briefly looked at that today,
> > 
> > The approach is fine.  Delaying evaluating sizeof is hard simply because 
> > of the expectation that integer constant expressions in general are 
> > evaluated early.
> 
> Ok, thanks.  Here is an updated patch, which gets away just with one global
> variable (location_t computed from token after sizeof keyword in the
> caller).  Bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?

This version is OK.

-- 
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]