From patchwork Wed Sep 19 10:08:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 971535 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-95931-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="eja6hC/c"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TwaF6edC"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42FbDG61T3z9sD0 for ; Wed, 19 Sep 2018 20:08:46 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=HG4yir9CTpljj00jO7acZs6zxPUuIhK YxrCDlxOMFA6gnyEtm8fAsERZN7UsZrwypaE51EEww9/8SUVUE9psM8U4Zcb4uzX 3Z5AnyA5X4ODjfUrpEejFLLtlI+wuOXHCx+e9/MedzxXhO9FUyTpVjtJcWD6PRdM XoNoEHhKkmEc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=H3Oe+Gl2I6J/djWYACGuyW2SfdY=; b=eja6h C/cgZFETIRsbUIIRq2fS8tY3S+RSG3hvroQAMf8nJ8upnEykAIlpOAFtP0VevX3o OfJsJFv1dMsCQ8AjIkbYtNk/YsUQrR1FQyNm+KmfdEIm3p6Keibn8BJWUWUkuRA/ 2ELF98PE38PYP3vtY225mOETZ4YjXbcezSmsp0= Received: (qmail 39263 invoked by alias); 19 Sep 2018 10:08:34 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 39135 invoked by uid 89); 19 Sep 2018 10:08:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm1-f66.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DV6i+Itp901f0SS+BgE/LmDbPMpOEv3AcwjGewP/gwk=; b=TwaF6edCIBTkBHG4yM7cFA5DkZbHxIi/9uF32yZ1jT1trtTGGyyStbLAzU9Grp2OFh Fs2rb/CYQuiIcLbPYpUdC4dmVm9xlLb2mULdhFZZDX5YZrE7lbGbGuZXAlyEoA//BUto mbOh1BInxYGx0pUSiZxbgwWL3lBr6Zi6axgDJtqdnZT17FM8TfeXzeew6xmMqLsVM+pV 5mZMSftBL8nstxVdtgwt/O4R9aJPjjRf9Vx+gA+oofQDKoFQVNeLmrj37xbEOzoLYNX8 BNCtdVlb5xIWaTbyYS++CyghYLs71EQ2cwGRJo3P8p9wgHVf3G4nHFre9FplgrM3IOCZ 63uw== From: Martin Jansa To: libc-alpha@sourceware.org Cc: Martin Jansa Subject: [PATCH 2/2] soft-fp: ignore maybe-uninitialized Date: Wed, 19 Sep 2018 10:08:25 +0000 Message-Id: <20180919100825.22999-2-Martin.Jansa@gmail.com> In-Reply-To: <20180919100825.22999-1-Martin.Jansa@gmail.com> References: <20180919100825.22999-1-Martin.Jansa@gmail.com> * with -O it fails with: In file included from ../soft-fp/soft-fp.h:318, from ../sysdeps/ieee754/soft-fp/s_fdiv.c:28: ../sysdeps/ieee754/soft-fp/s_fdiv.c: In function '__fdiv': ../soft-fp/op-2.h:98:25: error: 'R_f1' may be used uninitialized in this function [-Werror=maybe-uninitialized] X##_f0 = (X##_f1 << (_FP_W_TYPE_SIZE - (N)) | X##_f0 >> (N) \ ^~ ../sysdeps/ieee754/soft-fp/s_fdiv.c:38:14: note: 'R_f1' was declared here FP_DECL_D (R); ^ ../soft-fp/op-2.h:37:36: note: in definition of macro '_FP_FRAC_DECL_2' _FP_W_TYPE X##_f0 _FP_ZERO_INIT, X##_f1 _FP_ZERO_INIT ^ ../soft-fp/double.h:95:24: note: in expansion of macro '_FP_DECL' # define FP_DECL_D(X) _FP_DECL (2, X) ^~~~~~~~ ../sysdeps/ieee754/soft-fp/s_fdiv.c:38:3: note: in expansion of macro 'FP_DECL_D' FP_DECL_D (R); ^~~~~~~~~ ../soft-fp/op-2.h:101:17: error: 'R_f0' may be used uninitialized in this function [-Werror=maybe-uninitialized] : (X##_f0 << (_FP_W_TYPE_SIZE - (N))) != 0)); \ ^~ ../sysdeps/ieee754/soft-fp/s_fdiv.c:38:14: note: 'R_f0' was declared here FP_DECL_D (R); ^ ../soft-fp/op-2.h:37:14: note: in definition of macro '_FP_FRAC_DECL_2' _FP_W_TYPE X##_f0 _FP_ZERO_INIT, X##_f1 _FP_ZERO_INIT ^ ../soft-fp/double.h:95:24: note: in expansion of macro '_FP_DECL' # define FP_DECL_D(X) _FP_DECL (2, X) ^~~~~~~~ ../sysdeps/ieee754/soft-fp/s_fdiv.c:38:3: note: in expansion of macro 'FP_DECL_D' FP_DECL_D (R); ^~~~~~~~~ Signed-off-by: Martin Jansa --- soft-fp/op-2.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/soft-fp/op-2.h b/soft-fp/op-2.h index 6020d663d4..6672337949 100644 --- a/soft-fp/op-2.h +++ b/soft-fp/op-2.h @@ -92,6 +92,8 @@ X##_f1 = 0; \ })) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #define _FP_FRAC_SRS_2(X, N, sz) \ (void) (((N) < _FP_W_TYPE_SIZE) \ ? ({ \ @@ -109,6 +111,7 @@ | X##_f0) != 0)); \ X##_f1 = 0; \ })) +#pragma GCC diagnostic pop #define _FP_FRAC_ADDI_2(X, I) \ __FP_FRAC_ADDI_2 (X##_f1, X##_f0, I)