From patchwork Thu Sep 10 16:09:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1361678 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=RApuNrhP; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BnP3f3rKfz9sTq for ; Fri, 11 Sep 2020 02:09:50 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6DC223972431; Thu, 10 Sep 2020 16:09:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DC223972431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1599754188; bh=Y0nv6iE1x5mXY94050i+Xy3NkDkWohKR3rfRu8eG2pY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RApuNrhPOqbtKAYZMaODvA3h2cwY89aSzLo8WvRznB9OfABNFc7aYQivOzfmaft+q QyaYhldIT8cQsfVTg3jYGRnHFPwqWi5Rl0qTBakFJvDGK0xQP5k7Oc9v4DeC644nr/ M6ZEKBQuUFqjs4a+HNXzMkiHJn043IOoNdf1Olh0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 56DDE3972431 for ; Thu, 10 Sep 2020 16:09:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 56DDE3972431 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4BnP3Y2b0gzQlKM; Thu, 10 Sep 2020 18:09:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id wfX2RGCvoO7t; Thu, 10 Sep 2020 18:09:42 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [committed] d: Enable miscellaneous warnings by -Wextra flag Date: Thu, 10 Sep 2020 18:09:40 +0200 Message-Id: <20200910160940.3441414-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-MBO-SPAM-Probability: * X-Rspamd-Score: 1.26 / 15.00 / 15.00 X-Rspamd-Queue-Id: 49CBF14B0 X-Rspamd-UID: 3f334a X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Buclaw via Gcc-patches From: Iain Buclaw Reply-To: Iain Buclaw Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch turns on all warnings handled by the D front-end code generator with -Wextra. These warnings are handled outside of the D core language front-end, so shouldn't be enabled by -Wall. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-x32. Committed to mainline. Regards Iain. gcc/d/ChangeLog: * lang.opt (Waddress): Enable warning by -Wextra. (Wcast-result): Likewise. (Wunknown-pragmas): Likewise. --- gcc/d/lang.opt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/d/lang.opt b/gcc/d/lang.opt index ade92d21cc6..b88fe6f301f 100644 --- a/gcc/d/lang.opt +++ b/gcc/d/lang.opt @@ -99,7 +99,7 @@ D Joined Separate ; Documented in C Waddress -D Warning Var(warn_address) +D Warning Var(warn_address) LangEnabledBy(D, Wextra) ; Documented in C Wall @@ -119,7 +119,7 @@ D ; Documented in C Wcast-result -D Warning Var(warn_cast_result) +D Warning Var(warn_cast_result) LangEnabledBy(D, Wextra) Warn about casts that will produce a null result. Wdeprecated @@ -143,7 +143,7 @@ D ; Documented in C Wunknown-pragmas -D LangEnabledBy(D, Wall) +D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra) ; Documented in C Wvarargs