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)
-- 
2.30.2

Reply via email to