Patchwork Describe Wsizeof-pointer-memaccess in c.opt

login
register
mail settings
Submitter Marek Polacek
Date May 2, 2014, 12:50 p.m.
Message ID <20140502125014.GK11802@redhat.com>
Download mbox | patch
Permalink /patch/344958/
State New
Headers show

Comments

Marek Polacek - May 2, 2014, 12:50 p.m.
Wsizeof-pointer-memaccess option is missing a description in
the c.opt file.  This patch adds something in there.

Ok?

2014-05-02  Marek Polacek  <polacek@redhat.com>

	* c.opt (Wsizeof-pointer-memaccess): Describe option.


	Marek
Joseph S. Myers - May 2, 2014, 5:55 p.m.
On Fri, 2 May 2014, Marek Polacek wrote:

> Wsizeof-pointer-memaccess option is missing a description in
> the c.opt file.  This patch adds something in there.
> 
> Ok?

OK.

Patch

diff --git gcc/c-family/c.opt gcc/c-family/c.opt
index 1bbb81c..7aa9e23 100644
--- gcc/c-family/c.opt
+++ gcc/c-family/c.opt
@@ -516,6 +516,7 @@  Warn about missing fields in struct initializers
 
 Wsizeof-pointer-memaccess
 C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
+Warn about suspicious length parameters to certain string functions if the argument uses sizeof
 
 Wsuggest-attribute=format
 C ObjC C++ ObjC++ Var(warn_suggest_attribute_format) Warning