From patchwork Mon Nov 16 21:41:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1401182 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Received: from sourceware.org (unknown [8.43.85.97]) (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 4CZjF96T8Mz9sRK for ; Tue, 17 Nov 2020 08:41:15 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A763F396E068; Mon, 16 Nov 2020 21:41:12 +0000 (GMT) X-Original-To: GCC-patches@gcc.gnu.org Delivered-To: GCC-patches@gcc.gnu.org Received: from smtp1.wavenetuk.net (unknown [195.26.36.10]) by sourceware.org (Postfix) with ESMTP id 13011385780A for ; Mon, 16 Nov 2020 21:41:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 13011385780A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=iain@sandoe.co.uk Received: from [192.168.1.212] (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by smtp1.wavenetuk.net (Postfix) with ESMTPA id 1985F1201204; Mon, 16 Nov 2020 21:41:07 +0000 (GMT) From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Date: Mon, 16 Nov 2020 21:41:02 +0000 Subject: [pushed] C-family : Fix a C++ ODR violation [PR97854]. Message-Id: <4EA05900-68CC-4AFA-871F-45E030C4EADF@sandoe.co.uk> To: GCC Patches X-Mailer: Apple Mail (2.3273) X-Spam-Status: No, score=-15.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_COUK, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KHOP_HELO_FCRDNS, MAY_BE_FORGED, SPF_HELO_NONE, SPF_NONE, 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: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi The changes in r11-4799 introduced a dummy enum rid type with a different initial member name to the actual version (an ODR violation). Fixed by including the header declaring the actual type. tested --with-build-config=bootstrap-lto on Linux and --with-build-config=bootstrap-lto-noplugin on Darwin, pushed to master, thanks Iain gcc/c-family/ChangeLog: PR objc/97854 * stub-objc.c: Include c-common.h to declare enum rid. --- gcc/c-family/stub-objc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/c-family/stub-objc.c b/gcc/c-family/stub-objc.c index 26941aa2cb4..1914432678e 100644 --- a/gcc/c-family/stub-objc.c +++ b/gcc/c-family/stub-objc.c @@ -25,10 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "vec.h" -/* Provide a dummy type for the RID enum used as an argument to - objc_prop_attr_kind_for_rid () */ -enum rid { DUMMY }; - +#include "c-common.h" /* for enum rid. */ #include "c-objc.h" tree