Hi,

This patch removes uses of global.params to get information about the
target.  Using POINTER_SIZE is assumed to be reliably set at the point
where predefined version conditions are inserted into the compilation.

Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32,
committed to mainline.

Regards,
Iain

---
gcc/d/ChangeLog:

        * d-builtins.cc (d_init_versions): Use POINTER_SIZE for testing
        whether to predefine D_LP64.
---
 gcc/d/d-builtins.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc
index 328711fc745..ab39d69c294 100644
--- a/gcc/d/d-builtins.cc
+++ b/gcc/d/d-builtins.cc
@@ -462,7 +462,7 @@ d_init_versions (void)
   VersionCondition::addPredefinedGlobalIdent ("GNU_InlineAsm");
 
   /* LP64 only means 64bit pointers in D.  */
-  if (global.params.isLP64)
+  if (POINTER_SIZE == 64)
     VersionCondition::addPredefinedGlobalIdent ("D_LP64");
 
   /* Setting `global.params.cov' forces module info generation which is
-- 
2.30.2

Reply via email to