Qt patches (#147)

* Configure support for Green Hills compiler

Trust the GHS toolchain's floating-point libraries to handle double
conversions properly.

* Suppress MSVC warning C4244 in string-to-double.cc

MSVC 2015 and later warn:
C4244: 'argument': conversion from 'const uc16' to 'char', possible loss of data
in various character-handling templates, e.g. Advance.

* Limit MSVC-specific #proagma use to versions up to 2012

The optimisation-control on IsDecimalDigitForRadix(), to avoid a
warning, broke clang-cl builds (unknown #pragma); so refine the #if
condition to only apply it for versions up to MSVC2012, the one
documented to need it.

Mention the significance of suppressing optimisation in the comment
explaining it.  Also fix the grammar of the last sentence.  (The "By
moving it ..."  prefix on a sentence with "the compiler" as subject
tacitly claimed the compiler was doing the moving.)

* Suppress unused parameter warnings from compilers

Avoids breaking Qt's build, which uses -Werror=unused-parameter

Co-authored-by: Rolland Dudemaine <rolland@dudemaine.org>
Co-authored-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Co-authored-by: Andrei Golubev <andpgolubev@gmail.com>
diff --git a/double-conversion/string-to-double.cc b/double-conversion/string-to-double.cc
index 12b88f9..03ad670 100644
--- a/double-conversion/string-to-double.cc
+++ b/double-conversion/string-to-double.cc
@@ -35,6 +35,18 @@
 #include "strtod.h"
 #include "utils.h"
 
+#ifdef _MSC_VER
+#  if _MSC_VER >= 1900
+// Fix MSVC >= 2015 (_MSC_VER == 1900) warning
+// C4244: 'argument': conversion from 'const uc16' to 'char', possible loss of data
+// against Advance and friends, when instantiated with **it as char, not uc16.
+ __pragma(warning(disable: 4244))
+#  endif
+#  if _MSC_VER <= 1700 // VS2012, see IsDecimalDigitForRadix warning fix, below
+#    define VS2012_RADIXWARN
+#  endif
+#endif
+
 namespace double_conversion {
 
 namespace {
@@ -149,9 +161,9 @@
 //
 // The function is small and could be inlined, but VS2012 emitted a warning
 // because it constant-propagated the radix and concluded that the last
-// condition was always true. By moving it into a separate function the
-// compiler wouldn't warn anymore.
-#ifdef _MSC_VER
+// condition was always true. Moving it into a separate function and
+// suppressing optimisation keeps the compiler from warning.
+#ifdef VS2012_RADIXWARN
 #pragma optimize("",off)
 static bool IsDecimalDigitForRadix(int c, int radix) {
   return '0' <= c && c <= '9' && (c - '0') < radix;
diff --git a/double-conversion/strtod.cc b/double-conversion/strtod.cc
index 441be76..850bcda 100644
--- a/double-conversion/strtod.cc
+++ b/double-conversion/strtod.cc
@@ -202,6 +202,10 @@
                          int exponent,
                          double* result) {
 #if !defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS)
+  // Avoid "unused parameter" warnings
+  (void) trimmed;
+  (void) exponent;
+  (void) result;
   // On x86 the floating-point stack can be 64 or 80 bits wide. If it is
   // 80 bits wide (as is the case on Linux) then double-rounding occurs and the
   // result is not accurate.
diff --git a/double-conversion/utils.h b/double-conversion/utils.h
index 438d055..c72c333 100644
--- a/double-conversion/utils.h
+++ b/double-conversion/utils.h
@@ -108,7 +108,7 @@
     defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
     defined(__hppa__) || defined(__ia64__) || \
     defined(__mips__) || \
-    defined(__nios2__) || \
+    defined(__nios2__) || defined(__ghs) || \
     defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
     defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \