diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-08-17 09:17:56 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-08-17 09:17:56 +0200 |
commit | 1a4049e7c504bedf3f485fd94a26902959a4ce2a (patch) | |
tree | 4109785fceb3bc788cf4f9ee1e8a0fc71649fdfb /gcc/cp | |
parent | 138f5acd18aafd07cd4a034cb8e879dd0621544b (diff) | |
download | gcc-1a4049e7c504bedf3f485fd94a26902959a4ce2a.zip gcc-1a4049e7c504bedf3f485fd94a26902959a4ce2a.tar.gz gcc-1a4049e7c504bedf3f485fd94a26902959a4ce2a.tar.bz2 |
invoke.texi (-Wsizeof-pointer-memaccess): Document.
* doc/invoke.texi (-Wsizeof-pointer-memaccess): Document.
c/
* c-tree.h (c_last_sizeof_arg): Declare.
* c-parser.c (struct c_tree_loc_pair): New type.
(c_parser_expr_list): Add sizeof_arg argument. Fill it in if
non-NULL.
(c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
(c_parser_postfix_expression_after_primary): Likewise. Call
sizeof_pointer_memaccess_warning if needed.
(sizeof_ptr_memacc_comptypes): New function.
* c-typeck.c (c_last_sizeof_arg): New global variable.
(c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
cp/
* cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
c-family/
* c-common.c (sizeof_pointer_memaccess_warning): New function.
* c.opt (-Wsizeof-pointer-memaccess): Add new option.
* c-opts.c (c_common_handle_option): Enable it for -Wall.
* c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
* c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
fortran/
* array.c (gfc_match_array_ref): Fix up memset arguments.
testsuite/
* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: New test.
From-SVN: r190467
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/cp-tree.def | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 15bedb4..87fc86f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2012-08-17 Jakub Jelinek <jakub@redhat.com> + + * cp-tree.def (SIZEOF_EXPR): Move to c-common.def. + 2012-08-14 Diego Novillo <dnovillo@google.com> Merge from cxx-conversion branch. Re-write VEC in C++. diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index 83e0b5b..b5ed167 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -2,7 +2,7 @@ additional tree codes used in the GNU C++ compiler (see tree.def for the standard codes). Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998, 2003, 2004, 2005, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011, 2012 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) @@ -333,9 +333,6 @@ DEFTREECODE (TAG_DEFN, "tag_defn", tcc_expression, 0) /* Represents an 'offsetof' expression during template expansion. */ DEFTREECODE (OFFSETOF_EXPR, "offsetof_expr", tcc_expression, 1) -/* Represents a 'sizeof' expression during template expansion. */ -DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", tcc_expression, 1) - /* Represents the -> operator during template expansion. */ DEFTREECODE (ARROW_EXPR, "arrow_expr", tcc_expression, 1) |