diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2021-07-03 19:47:48 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2021-07-06 11:13:38 +0100 |
commit | f99f6eb58e1f894dae024f63cc2fe30fa7605e59 (patch) | |
tree | 051a55a5c014dd914cd8bd364904c247f823650f /gcc/config/i386/i386.h | |
parent | 7d810646d421f6975300c0d06f4e9af27a48f26d (diff) | |
download | gcc-f99f6eb58e1f894dae024f63cc2fe30fa7605e59.zip gcc-f99f6eb58e1f894dae024f63cc2fe30fa7605e59.tar.gz gcc-f99f6eb58e1f894dae024f63cc2fe30fa7605e59.tar.bz2 |
X86: Provide a CTOR for stringop_algs [PR100246].
Several older compilers fail to build modern GCC because of missing
or incomplete C++11 support.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/100246 - [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
PR bootstrap/100246
gcc/ChangeLog:
* config/i386/i386.h (struct stringop_algs): Define a CTOR for
this type.
Diffstat (limited to 'gcc/config/i386/i386.h')
-rw-r--r-- | gcc/config/i386/i386.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 6e0340a..03d1761 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -73,6 +73,15 @@ struct stringop_algs { const enum stringop_alg unknown_size; const struct stringop_strategy { + /* Several older compilers delete the default constructor because of the + const entries (see PR100246). Manually specifying a CTOR works around + this issue. Since this header is used by code compiled with the C + compiler we must guard the addition. */ +#ifdef __cplusplus + stringop_strategy(int _max = -1, enum stringop_alg _alg = libcall, + int _noalign = false) + : max (_max), alg (_alg), noalign (_noalign) {} +#endif const int max; const enum stringop_alg alg; int noalign; |