]> gcc.gnu.org Git - gcc.git/commit
Fix up bootstrap with GCC 4.[89] after RAII auto_mpfr and autp_mpz [PR109589]
authorJakub Jelinek <jakub@redhat.com>
Sat, 22 Apr 2023 18:14:06 +0000 (20:14 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sat, 22 Apr 2023 18:14:06 +0000 (20:14 +0200)
commit195270d28a534cc1f08478c6e0136f4fc13d247a
tree0c45356cbc8f6f57b34f1f57a9f339f254ae6011
parent00c49869fed445bf0f70cfa06b9bae1e75a393c8
Fix up bootstrap with GCC 4.[89] after RAII auto_mpfr and autp_mpz [PR109589]

On Tue, Apr 18, 2023 at 03:39:41PM +0200, Richard Biener via Gcc-patches wrote:
> The following adds two RAII classes, one for mpz_t and one for mpfr_t
> making object lifetime management easier.  Both formerly require
> explicit initialization with {mpz,mpfr}_init and release with
> {mpz,mpfr}_clear.

This unfortunately broke bootstrap when using GCC 4.8.x or 4.9.x as
it uses deleted friends which weren't supported until PR62101 fixed
them in 2014 for GCC 5.

The following patch adds an workaround, not deleting those friends
for those old versions.
While it means if people add those mp*_{init{,2},clear} calls on auto_mp*
objects they won't notice when doing non-bootstrap builds using
very old system compilers, people should be bootstrapping their changes
and it will be caught during bootstraps even when starting with those
old compilers, plus most people actually use much newer compilers
when developing.

2023-04-22  Jakub Jelinek  <jakub@redhat.com>

PR bootstrap/109589
* system.h (class auto_mpz): Workaround PR62101 bug in GCC 4.8 and 4.9.
* realmpfr.h (class auto_mpfr): Likewise.
gcc/realmpfr.h
gcc/system.h
This page took 0.062701 seconds and 5 git commands to generate.