aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-05-26 14:07:42 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-05-26 14:07:42 +0000
commitd93461f724b233e2af55555da586d5d5ebe2081b (patch)
tree2ebc71da6aa43cdc4e961adcdedc34a493d0bc17
parentbfe51f424a31275083a79e8f524af2976ff30b29 (diff)
downloadgcc-d93461f724b233e2af55555da586d5d5ebe2081b.zip
gcc-d93461f724b233e2af55555da586d5d5ebe2081b.tar.gz
gcc-d93461f724b233e2af55555da586d5d5ebe2081b.tar.bz2
wide-int.h (wi::int_traits <long>, [...]): Provide specializations.
2014-05-26 Richard Biener <rguenther@suse.de> * wide-int.h (wi::int_traits <long>, wi::int_traits <unsigned long>, wi::int_traits <long long>, wi::int_traits <unsigned long long>): Provide specializations. (wi::int_traits <HOST_WIDE_INT>, wi::int_traits <unsigned HOST_WIDE_INT>): Remove specializations. From-SVN: r210933
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/wide-int.h18
2 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ac70e16..c696a51 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2014-05-26 Richard Biener <rguenther@suse.de>
+
+ * wide-int.h (wi::int_traits <long>, wi::int_traits <unsigned long>,
+ wi::int_traits <long long>, wi::int_traits <unsigned long long>):
+ Provide specializations.
+ (wi::int_traits <HOST_WIDE_INT>,
+ wi::int_traits <unsigned HOST_WIDE_INT>): Remove specializations.
+
2014-05-26 Alan Modra <amodra@gmail.com>
PR target/61098
diff --git a/gcc/wide-int.h b/gcc/wide-int.h
index d5ab428..bb51ed2 100644
--- a/gcc/wide-int.h
+++ b/gcc/wide-int.h
@@ -1446,12 +1446,22 @@ namespace wi
: public primitive_int_traits <unsigned int, false> {};
template <>
- struct int_traits <HOST_WIDE_INT>
- : public primitive_int_traits <HOST_WIDE_INT, true> {};
+ struct int_traits <long>
+ : public primitive_int_traits <long, true> {};
template <>
- struct int_traits <unsigned HOST_WIDE_INT>
- : public primitive_int_traits <unsigned HOST_WIDE_INT, false> {};
+ struct int_traits <unsigned long>
+ : public primitive_int_traits <unsigned long, false> {};
+
+#if defined HAVE_LONG_LONG
+ template <>
+ struct int_traits <long long>
+ : public primitive_int_traits <long long, true> {};
+
+ template <>
+ struct int_traits <unsigned long long>
+ : public primitive_int_traits <unsigned long long, false> {};
+#endif
}
namespace wi