public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3209] d: Get __c_wchar_t type from build_frontend_type
@ 2021-08-29 16:31 Iain Buclaw
  0 siblings, 0 replies; only message in thread
From: Iain Buclaw @ 2021-08-29 16:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0abfd7f4f484500a37a3e367d0a63a1f38bba2fa

commit r12-3209-g0abfd7f4f484500a37a3e367d0a63a1f38bba2fa
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Sat Aug 28 20:22:22 2021 +0200

    d: Get __c_wchar_t type from build_frontend_type
    
    gcc/d/ChangeLog:
    
            * types.cc (TypeVisitor::visit(TypeEnum*)): Get wchar_t type from
            build_frontend_type.

Diff:
---
 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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-29 16:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29 16:31 [gcc r12-3209] d: Get __c_wchar_t type from build_frontend_type Iain Buclaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).