This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, committed] Fix uninitialized variables causing breakage with -Werror.
- From: Adam Butcher <adam at jessamine dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jason Merrill <jason at redhat dot com>, Gabriel Dos Reis <gdr at integrable-solutions dot net>, Andrew Sutton <andrew dot n dot sutton at gmail dot com>, adam at jessamine dot co dot uk
- Date: Fri, 13 Sep 2013 07:38:56 +0100
- Subject: [PATCH, committed] Fix uninitialized variables causing breakage with -Werror.
- Authentication-results: sourceware.org; auth=none
From: abutcher <abutcher@138bc75d-0d04-0410-961f-82ee72b054a4>
* lambda.c (maybe_add_lambda_conv_op): Initialize direct_argvec and call
to nullptr to avoid breakage with -Werror.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202554 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/cp/ChangeLog | 5 +++++
gcc/cp/lambda.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 68c8ea4..80e0d96 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-13 Adam Butcher <adam@jessamine.co.uk>
+
+ * lambda.c (maybe_add_lambda_conv_op): Initialize direct_argvec and call
+ to nullptr to avoid breakage with -Werror.
+
2013-09-12 Brooks Moses <bmoses@google.com>
PR driver/42955
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 2d20333..0da22fd 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -792,8 +792,8 @@ maybe_add_lambda_conv_op (tree type)
particular, parameter pack expansions are marked PACK_EXPANSION_LOCAL_P in
the body CALL, but not in DECLTYPE_CALL. */
- vec<tree, va_gc> *direct_argvec;
- tree decltype_call = 0, call;
+ vec<tree, va_gc> *direct_argvec = 0;
+ tree decltype_call = 0, call = 0;
tree fn_result = TREE_TYPE (TREE_TYPE (callop));
if (generic_lambda_p)
--
1.8.4