summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-06 02:24:44 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-06 02:24:44 +0000
commitb6a74ba4d0d3be3f289f6084e3d7ef00eca1c266 (patch)
treed04e62e159ed043361fa3c9745894af9f66e66ea
parent2b89ba2d35c26e10b1bdbbbf68aae402bfb9a04c (diff)
downloadgcc-b6a74ba4d0d3be3f289f6084e3d7ef00eca1c266.tar.gz
Fix g++.dg/torture/Wsizeof-pointer-memaccess2.C with -std=c++11
* semantics.c (finish_call_expr): Check complain. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222840 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/semantics.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 029c64937a2..09476c43a01 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,7 @@
2015-05-05 Jason Merrill <jason@redhat.com>
+ * semantics.c (finish_call_expr): Check complain.
+
* decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
maybe-in-charge constructor.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 0fc08b5f1ed..701a8ebf18f 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2377,6 +2377,7 @@ finish_call_expr (tree fn, vec<tree, va_gc> **args, bool disallow_virtual,
if (!result)
{
if (warn_sizeof_pointer_memaccess
+ && (complain & tf_warning)
&& !vec_safe_is_empty (*args)
&& !processing_template_decl)
{