aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2022-12-06 18:43:44 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2022-12-06 18:43:44 +0000
commit98b201a33be33a60e10e67fb7f6c9d0fc5da00fc (patch)
treeeca994ba8cf0a502ea156cdaaf1d698c89e49ef2
parent5405813b8aab29b9ca035a8c7bceac178494649f (diff)
downloadgcc-98b201a33be33a60e10e67fb7f6c9d0fc5da00fc.zip
gcc-98b201a33be33a60e10e67fb7f6c9d0fc5da00fc.tar.gz
gcc-98b201a33be33a60e10e67fb7f6c9d0fc5da00fc.tar.bz2
Bugfix gm2_type_for_size. Patchset suggestion missed.
A feedback suggestion missed with the previous commits. Use build_nonstandard_integer_type to avoid getting a different type each time this function is called. gcc/m2/ChangeLog: * m2/gm2-lang.cc (gm2_type_for_size): Use build_nonstandard_integer_type. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
-rw-r--r--gcc/m2/gm2-lang.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc
index 2f57d74..4acec02 100644
--- a/gcc/m2/gm2-lang.cc
+++ b/gcc/m2/gm2-lang.cc
@@ -816,7 +816,8 @@ gm2_type_for_size (unsigned int bits, int unsignedp)
else if (bits == LONG_LONG_TYPE_SIZE)
type = long_long_unsigned_type_node;
else
- type = make_unsigned_type (bits);
+ type = build_nonstandard_integer_type (bits,
+ unsignedp);
}
else
{
@@ -831,7 +832,8 @@ gm2_type_for_size (unsigned int bits, int unsignedp)
else if (bits == LONG_LONG_TYPE_SIZE)
type = long_long_integer_type_node;
else
- type = make_signed_type (bits);
+ type = build_nonstandard_integer_type (bits,
+ unsignedp);
}
return type;
}