[pkg-d-commits] [ldc] 134/149: Fix unused variable warnings for LLVM >= 4.0 (#2040)

Matthias Klumpp mak at moszumanska.debian.org
Sun Apr 23 22:37:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.2.0
in repository ldc.

commit 86965100dce674c482b0c5bb149687b35feefd1e
Author: Johan Engelen <jbc.engelen at gmail.com>
Date:   Sat Mar 18 20:57:22 2017 +0100

    Fix unused variable warnings for LLVM >= 4.0 (#2040)
---
 gen/ctfloat.cpp | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/gen/ctfloat.cpp b/gen/ctfloat.cpp
index 54b4feb..055b6fc 100644
--- a/gen/ctfloat.cpp
+++ b/gen/ctfloat.cpp
@@ -27,21 +27,17 @@ void CTFloat::toAPFloat(const real_t src, APFloat &dst) {
   u.fp = src;
 
 #if LDC_LLVM_VER >= 400
-  const auto &x87DoubleExtended = APFloat::x87DoubleExtended();
-  const auto &IEEEquad = APFloat::IEEEquad();
-  const auto &PPCDoubleDouble = APFloat::PPCDoubleDouble();
+  #define PARENS ()
 #else
-  const auto &x87DoubleExtended = APFloat::x87DoubleExtended;
-  const auto &IEEEquad = APFloat::IEEEquad;
-  const auto &PPCDoubleDouble = APFloat::PPCDoubleDouble;
+  #define PARENS
 #endif
 
 #if __i386__ || __x86_64__
-  dst = APFloat(x87DoubleExtended, APInt(80, 2, u.bits));
+  dst = APFloat(APFloat::x87DoubleExtended PARENS, APInt(80, 2, u.bits));
 #elif __aarch64__
-  dst = APFloat(IEEEquad, APInt(128, 2, u.bits));
+  dst = APFloat(APFloat::IEEEquad PARENS, APInt(128, 2, u.bits));
 #elif __ppc__ || __ppc64__
-  dst = APFloat(PPCDoubleDouble, APInt(128, 2, u.bits));
+  dst = APFloat(APFloat::PPCDoubleDouble PARENS, APInt(128, 2, u.bits));
 #else
   llvm_unreachable("Unknown host real_t type for compile-time reals");
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list