From patchwork Fri Sep 13 06:38:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Butcher X-Patchwork-Id: 274659 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 93E882C0174 for ; Fri, 13 Sep 2013 16:39:33 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=b8dwO8s2nQ+F RRqvNnF0vkfRBAHJ8oqPKEqPV7urE5/VL2918CisnO/NQTxr/V6RRgH5m0hpksxD OFizbykhEyWVnggdah7KtWj26gopkmjn6DIu5YRHKnr5GJuCqytW2j2E8G8tZ4zY j+0a134bLeRCnEQhquhIUDBR7G38pU4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=k1Iw//FSMCQo1JfQ+3 UOg3dvUkY=; b=wEvf7vR2xniQQ6alQzGXsMhD6zwD3FjdQWYTBoPbB+ETWo0NuL 7RS+WTPkGwnhz+9cfbi3b0Am6DLo5lTyeRb/XuVFQvr8Eukz8fK2fc2nPqvTMCYt wM/WsFfcxcE/e1mk3vgNISJTcg7/s5UezJhf5jSAyEBxtFLC0BEmxrfHU= Received: (qmail 1804 invoked by alias); 13 Sep 2013 06:39:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 1787 invoked by uid 89); 13 Sep 2013 06:39:26 -0000 Received: from mail-wg0-f41.google.com (HELO mail-wg0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 13 Sep 2013 06:39:26 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED, AWL, BAYES_00, FREEMAIL_FROM autolearn=ham version=3.3.2 X-HELO: mail-wg0-f41.google.com Received: by mail-wg0-f41.google.com with SMTP id l18so375934wgh.2 for ; Thu, 12 Sep 2013 23:39:22 -0700 (PDT) X-Received: by 10.181.12.104 with SMTP id ep8mr1224613wid.54.1379054362688; Thu, 12 Sep 2013 23:39:22 -0700 (PDT) Received: from sphere.lan (munkyhouse.force9.co.uk. [84.92.244.81]) by mx.google.com with ESMTPSA id r6sm1099753wiw.0.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Sep 2013 23:39:21 -0700 (PDT) From: Adam Butcher To: gcc-patches@gcc.gnu.org Cc: Jason Merrill , Gabriel Dos Reis , Andrew Sutton , adam@jessamine.co.uk Subject: [PATCH, committed] Fix uninitialized variables causing breakage with -Werror. Date: Fri, 13 Sep 2013 07:38:56 +0100 Message-Id: <1379054342-14878-1-git-send-email-adam@jessamine.co.uk> From: abutcher * 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 + + * lambda.c (maybe_add_lambda_conv_op): Initialize direct_argvec and call + to nullptr to avoid breakage with -Werror. + 2013-09-12 Brooks Moses 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 *direct_argvec; - tree decltype_call = 0, call; + vec *direct_argvec = 0; + tree decltype_call = 0, call = 0; tree fn_result = TREE_TYPE (TREE_TYPE (callop)); if (generic_lambda_p)