From patchwork Sun Aug 29 16:33:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1521976 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+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) 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=r6iEFsV7; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [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 4GyJxG2X4Pz9sVw for ; Mon, 30 Aug 2021 02:36:18 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3407F3857C4E for ; Sun, 29 Aug 2021 16:36:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3407F3857C4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1630254976; bh=MqcF7JxBkjpJBuKJkjnQDAJ6HI9i8PLEclXaRbxM1ls=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=r6iEFsV7sNa3bTxIc/4ALsYc1HgoQBncxYqBVfYev6KKkoPQW5fUzmLHHcP1N+QFm NN4IiaLPdm9aSwGCvuh2ICV53R0dQ/aL4UHqSocfIE+UgO4Q3ZoUF0krd34TP8L+wA zARJcGSKpinhy47zgMaT7UgukfC5yZDgTPxEZ4vw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050::465:201]) by sourceware.org (Postfix) with ESMTPS id D4B643857C69 for ; Sun, 29 Aug 2021 16:34:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D4B643857C69 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:105:465:1:3: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-201.mailbox.org (Postfix) with ESMTPS id 4GyJth0Xy3zQk9J; Sun, 29 Aug 2021 18:34:04 +0200 (CEST) Received: from hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) by smtp102.mailbox.org (Postfix) with ESMTP id 3D20D266; Sun, 29 Aug 2021 18:34:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp102.mailbox.org ([80.241.60.233]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id J9vgI58Kqx1i; Sun, 29 Aug 2021 18:33:58 +0200 (CEST) Received: from galago.. (unknown [IPv6:2a02:8109:8680:293c:4a75:a36c:72fb:f6f8]) (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 smtp102.mailbox.org (Postfix) with ESMTPSA id 4A1FC268; Sun, 29 Aug 2021 18:33:58 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [committed] d: Get __c_wchar_t type from build_frontend_type Date: Sun, 29 Aug 2021 18:33:56 +0200 Message-Id: <20210829163356.2036541-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 3D20D266 X-Rspamd-UID: fac831 X-Spam-Status: No, score=-14.5 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi This patch uses build_frontend_type to get the underlying type for __c_wchar_t. The previous field has been removed from the upstream D implementation of the D front-end. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards, Iain --- gcc/d/ChangeLog: * types.cc (TypeVisitor::visit(TypeEnum*)): Get wchar_t type from build_frontend_type. --- gcc/d/types.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/d/types.cc b/gcc/d/types.cc index 8e674618004..fc8a1330696 100644 --- a/gcc/d/types.cc +++ b/gcc/d/types.cc @@ -886,7 +886,8 @@ public: else if (strcmp (ident, "ulong") == 0) underlying = build_frontend_type (long_unsigned_type_node); else if (strcmp (ident, "wchar_t") == 0) - underlying = target.c.twchar_t; + underlying = + build_frontend_type (make_unsigned_type (WCHAR_TYPE_SIZE)); else if (strcmp (ident, "longlong") == 0) underlying = build_frontend_type (long_long_integer_type_node); else if (strcmp (ident, "ulonglong") == 0)