From: Gerald Pfeifer Date: Sun, 26 Oct 2025 17:01:02 +0000 (+0100) Subject: poly-int: Fix struct vs class confusion X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5b6b6f7198b1d3212abe1858b8091c2dcc828a2;p=thirdparty%2Fgcc.git poly-int: Fix struct vs class confusion We currently issue a good deal of warnings of the following kind: In file included from /scratch/tmp/gerald/GCC-HEAD/gcc/coretypes.h:500: .../GCC-HEAD/gcc/poly-int.h:378:1: warning: 'poly_int' defined as a struct template here but previously declared as a class template; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags] 378 | struct poly_int | ^ .../GCC-HEAD/gcc/poly-int.h:32:38: note: did you mean struct here? 32 | template class poly_int; | ^~~~~ | struct A `grep "'poly_int' defined as a struct template" | cut -d: -f1 | uniq -c` shows 749 issue for a typical bootstrap. Addressing this brings down the bootstrap log by 8.5% - from 80454 lines down to 73613. gcc: * poly-int.h: Change struct poly_int to class poly_int. --- diff --git a/gcc/poly-int.h b/gcc/poly-int.h index 77f78752e74..d99f63b671f 100644 --- a/gcc/poly-int.h +++ b/gcc/poly-int.h @@ -374,7 +374,7 @@ template<> struct poly_int_fullness { using type = poly_int_full; }; /* A class containing polynomial integers. The polynomial has N coefficients of type C, and N - 1 indeterminates. */ template -struct poly_int +class poly_int { public: poly_int () = default;