re PR c++/52312 (grokfndecl: valgrind problem)
authorJakub Jelinek <jakub@redhat.com>
Mon, 20 Feb 2012 23:34:42 +0000 (00:34 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 20 Feb 2012 23:34:42 +0000 (00:34 +0100)
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

gcc/cp/ChangeLog
gcc/cp/typeck.c

index faa85939428a266e0751b21b0816aa006ad0fa06..2c81a8a41197ec81d6600e38530ac910ef6cdeae 100644 (file)
@@ -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
index 91e7a0a09ca7e9de904fdd2b20a1b1a5feaff56a..ba5ae46814ea540207aae60ae8634595198db32e 100644 (file)
@@ -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;