]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Get __c_wchar_t type from build_frontend_type
authorIain Buclaw <ibuclaw@gdcproject.org>
Sat, 28 Aug 2021 18:22:22 +0000 (20:22 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Aug 2021 15:19:02 +0000 (17:19 +0200)
gcc/d/ChangeLog:

* types.cc (TypeVisitor::visit(TypeEnum*)): Get wchar_t type from
build_frontend_type.

gcc/d/types.cc

index 8e674618004d9a86ba9cba71fb53a407c750ed4f..fc8a1330696d88ddaa45ed333232d004499dbde6 100644 (file)
@@ -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)