aboutsummaryrefslogtreecommitdiff
path: root/gcc/double-int.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-10-12 17:20:36 +0200
committerJakub Jelinek <jakub@redhat.com>2023-10-12 17:20:36 +0200
commit53a94071fa9e90e268a94adbdc903bd868ddeec1 (patch)
tree4a9f89f2f98396f5680c384ed7414935745d43a6 /gcc/double-int.h
parente99ad401f84ca6cd2717a58a116e44274d55da70 (diff)
downloadgcc-53a94071fa9e90e268a94adbdc903bd868ddeec1.zip
gcc-53a94071fa9e90e268a94adbdc903bd868ddeec1.tar.gz
gcc-53a94071fa9e90e268a94adbdc903bd868ddeec1.tar.bz2
wide-int: Fix build with gcc < 12 or clang++ [PR111787]
While my wide_int patch bootstrapped/regtested fine when I used GCC 12 as system gcc, apparently it doesn't with GCC 11 and older or clang++. For GCC before PR96555 C++ DR1315 implementation the compiler complains about template argument involving template parameters, for clang++ the same + complains about missing needs_write_val_arg static data member in some wi::int_traits specializations. 2023-10-12 Jakub Jelinek <jakub@redhat.com> PR bootstrap/111787 * tree.h (wi::int_traits <unextended_tree>::needs_write_val_arg): New static data member. (int_traits <extended_tree <N>>::needs_write_val_arg): Likewise. (wi::ints_for): Provide separate partial specializations for generic_wide_int <extended_tree <N>> and INL_CONST_PRECISION or that and CONST_PRECISION, rather than using int_traits <extended_tree <N> >::precision_type as the second template argument. * rtl.h (wi::int_traits <rtx_mode_t>::needs_write_val_arg): New static data member. * double-int.h (wi::int_traits <double_int>::needs_write_val_arg): Likewise.
Diffstat (limited to 'gcc/double-int.h')
-rw-r--r--gcc/double-int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/double-int.h b/gcc/double-int.h
index 5fe6702..2bd492a 100644
--- a/gcc/double-int.h
+++ b/gcc/double-int.h
@@ -442,6 +442,7 @@ namespace wi
{
static const enum precision_type precision_type = INL_CONST_PRECISION;
static const bool host_dependent_precision = true;
+ static const bool needs_write_val_arg = false;
static const unsigned int precision = HOST_BITS_PER_DOUBLE_INT;
static unsigned int get_precision (const double_int &);
static wi::storage_ref decompose (HOST_WIDE_INT *, unsigned int,