Joseph pointed out "floating types should have their mode,
not a poorly defined precision value" in the discussion[1],
as he and Richi suggested, the existing macros
{FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE will be replaced with a
hook mode_for_floating_type. To be prepared for that, this
patch is to replace use of LONG_DOUBLE_TYPE_SIZE in vms port
with TYPE_PRECISION of long_double_type_node.
[1] https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651209.html
gcc/ChangeLog:
* config/vms/vms.cc (vms_patch_builtins): Use TYPE_PRECISION of
long_double_type_node to replace LONG_DOUBLE_TYPE_SIZE.
---
gcc/config/vms/vms.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/config/vms/vms.cc b/gcc/config/vms/vms.cc
index d468c79e559..2fcc673c8a9 100644
--- a/gcc/config/vms/vms.cc
+++ b/gcc/config/vms/vms.cc
@@ -141,6 +141,7 @@ vms_patch_builtins (void)
if (builtin_decl_implicit_p (BUILT_IN_FWRITE_UNLOCKED))
set_builtin_decl_implicit_p (BUILT_IN_FWRITE_UNLOCKED, false);
+ unsigned long_double_type_size = TYPE_PRECISION (long_double_type_node);
/* Define aliases for names. */
for (i = 0; i < NBR_CRTL_NAMES; i++)
{
@@ -179,7 +180,7 @@ vms_patch_builtins (void)
vms_add_crtl_xlat (alt, nlen + 1, res, rlen);
/* Long double version. */
- res[rlen - 1] = (LONG_DOUBLE_TYPE_SIZE == 128 ? 'X' : 'T');
+ res[rlen - 1] = (long_double_type_size == 128 ? 'X' : 'T');
alt[nlen] = 'l';
vms_add_crtl_xlat (alt, nlen + 1, res, rlen);
@@ -223,7 +224,7 @@ vms_patch_builtins (void)
if (n->flags & VMS_CRTL_FLOAT64)
res[rlen++] = 't';
- if ((n->flags & VMS_CRTL_FLOAT128) && LONG_DOUBLE_TYPE_SIZE == 128)
+ if ((n->flags & VMS_CRTL_FLOAT128) && long_double_type_size == 128)
res[rlen++] = 'x';
memcpy (res + rlen, n->name, nlen);
--
2.43.0