[C PATCH] proposal to add new warning -Wsizeof-array-argument

Joseph S. Myers joseph@codesourcery.com
Fri May 2 00:20:00 GMT 2014


The following apply to all versions of this patch:

* New options need documenting in invoke.texi.

* New options need nonempty help text in c.opt.  (It's unfortunate that 
the -Wsizeof-pointer-memaccess option immediately above got added without 
such help text.)

* Don't use %s with IDENTIFIER_POINTER in diagnostics; instead, use %qE 
with the identifier passed directly to warning_at, as that will handle 
converting extended identifiers appropriately for the user's locale.

* What happens if some declarations of the function use a pointer and some 
use an array?  You should consider this case, decide what the best 
semantics are and ensure the testsuite verifies that they are implemented.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list