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


On Wed, 18 Jul 2012, Jakub Jelinek wrote:

> +	  if (warn_sizeof_pointer_memaccess
> +	      && sizeof_arg != NULL_TREE)
> +	    sizeof_pointer_memaccess_warning (c_last_sizeof_arg_loc,
> +					      expr.value, exprlist,
> +					      sizeof_arg,
> +					      sizeof_ptr_memacc_comptypes);

Why do you pass a local variable sizeof_arg but a global 
c_last_sizeof_arg_loc here?  I'd have expected the same approach to apply 
for both arguments (e.g. passing down a pointer to a location alongside 
&sizeof_arg).

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