aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d')
-rw-r--r--gcc/d/ChangeLog7
-rw-r--r--gcc/d/d-builtins.cc10
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog
index 00845df..6b692f5 100644
--- a/gcc/d/ChangeLog
+++ b/gcc/d/ChangeLog
@@ -1,5 +1,12 @@
2019-08-20 Iain Buclaw <ibuclaw@gdcproject.org>
+ PR d/90445
+ * d-builtins.cc (d_build_c_type_nodes): Test UINTMAX_TYPE for setting
+ uintmax_type_node. Set signed_size_type_node as the signed_type_for
+ size_type_node.
+
+2019-08-20 Iain Buclaw <ibuclaw@gdcproject.org>
+
PR d/90444
* d-builtins.cc (build_frontend_type): Build anonymous RECORD_TYPE
nodes as well, push all fields to the struct members.
diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc
index 5619ebb..2f7319c 100644
--- a/gcc/d/d-builtins.cc
+++ b/gcc/d/d-builtins.cc
@@ -762,27 +762,25 @@ d_build_c_type_nodes (void)
= build_pointer_type (build_qualified_type (char_type_node,
TYPE_QUAL_CONST));
- if (strcmp (SIZE_TYPE, "unsigned int") == 0)
+ if (strcmp (UINTMAX_TYPE, "unsigned int") == 0)
{
intmax_type_node = integer_type_node;
uintmax_type_node = unsigned_type_node;
- signed_size_type_node = integer_type_node;
}
- else if (strcmp (SIZE_TYPE, "long unsigned int") == 0)
+ else if (strcmp (UINTMAX_TYPE, "long unsigned int") == 0)
{
intmax_type_node = long_integer_type_node;
uintmax_type_node = long_unsigned_type_node;
- signed_size_type_node = long_integer_type_node;
}
- else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
+ else if (strcmp (UINTMAX_TYPE, "long long unsigned int") == 0)
{
intmax_type_node = long_long_integer_type_node;
uintmax_type_node = long_long_unsigned_type_node;
- signed_size_type_node = long_long_integer_type_node;
}
else
gcc_unreachable ();
+ signed_size_type_node = signed_type_for (size_type_node);
wint_type_node = unsigned_type_node;
pid_type_node = integer_type_node;
}