https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111656

            Bug ID: 111656
           Summary: Recent build failure with clang
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I normally build trunk gcc with clang. However, today it didn't work.
clang said:

../../trunk.year/gcc/poly-int.h:453:14: error: excess elements in array
initializer

Source code is

template<unsigned int N, typename C>
template<typename ...Cs>
inline constexpr
poly_int<N, C>::poly_int (poly_int_full, const Cs &... cs)
  : coeffs { (typename poly_coeff_traits<C>::
          template init_cast<Cs>::type (cs))... } {}

It build fine with gcc, so I have a temporary workaround.

git blame says:

eaa41a6dc12 (Richard Sandiford 2023-09-29 17:55:12 +0100  449)
template<unsigned int N, typename C>
eaa41a6dc12 (Richard Sandiford 2023-09-29 17:55:12 +0100  450)
template<typename ...Cs>
eaa41a6dc12 (Richard Sandiford 2023-09-29 17:55:12 +0100  451) inline constexpr
eaa41a6dc12 (Richard Sandiford 2023-09-29 17:55:12 +0100  452) poly_int<N,
C>::poly_int (poly_int_full, const Cs &... cs)
eaa41a6dc12 (Richard Sandiford 2023-09-29 17:55:12 +0100  453)   : coeffs {
(typename poly_coeff_traits<C>::
eaa41a6dc12 (Richard Sandiford 2023-09-29 17:55:12 +0100  454)        template
init_cast<Cs>::type (cs))... } {}

Reply via email to