aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-02-21 00:34:42 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2012-02-21 00:34:42 +0100
commit6e887223a0bfe4e691107cc2a7d7fc3793cd93fd (patch)
tree862e9ae465f75ee7da4dc4018ed4eb3f54a2f693
parent9954e17f70b8212a51603332d6c15991b7ada434 (diff)
downloadgcc-6e887223a0bfe4e691107cc2a7d7fc3793cd93fd.zip
gcc-6e887223a0bfe4e691107cc2a7d7fc3793cd93fd.tar.gz
gcc-6e887223a0bfe4e691107cc2a7d7fc3793cd93fd.tar.bz2
re PR c++/52312 (grokfndecl: valgrind problem)
PR c++/52312 * typeck.c (check_literal_operator_args): Initialize *long_double_p and *long_long_unsigned_p even if processing_template_decl. From-SVN: r184416
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/typeck.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index faa8593..2c81a8a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/52312
+ * typeck.c (check_literal_operator_args): Initialize *long_double_p
+ and *long_long_unsigned_p even if processing_template_decl.
+
2012-02-16 Jason Merrill <jason@redhat.com>
PR c++/52248
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 91e7a0a..ba5ae46 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -8483,6 +8483,9 @@ check_literal_operator_args (const_tree decl,
bool *long_long_unsigned_p, bool *long_double_p)
{
tree argtypes = TYPE_ARG_TYPES (TREE_TYPE (decl));
+
+ *long_long_unsigned_p = false;
+ *long_double_p = false;
if (processing_template_decl || processing_specialization)
return argtypes == void_list_node;
else
@@ -8491,9 +8494,6 @@ check_literal_operator_args (const_tree decl,
int arity;
int max_arity = 2;
- *long_long_unsigned_p = false;
- *long_double_p = false;
-
/* Count the number and type of arguments and check for ellipsis. */
for (argtype = argtypes, arity = 0;
argtype && argtype != void_list_node;