On 23/02/16 10:00 +0000, Bernd Edlinger wrote:
On 23/02/15 10:42, Jonathan Wakely wrote:
On 23/02/16 07:15 +0000, Bernd Edlinger wrote:
as described in the PR 69881 it happens quite often that cstddef is
called with __need_size_t because we still support gmp-4.3.2 which
is installed by contrib/download_prerequisites.  This causes a kind
of undefined behavior.  It is just by chance that this does not cause
the gcc-6 boot-strap to fail, but it causes gcc-4.9 bootstrap to fail
when the gcc-6 version of cstddef is around.  So it looks like a
regression, because the new cstddef is more fragile than before.

Is it? cstddef hasn't been changed since 2013-06-11. cstdarg hasn't
been changed since 2011-01-30.

What made them more fragile?

Good question.

The cstddef had this even in gcc.4.9 that's true, but it was not used
by default:

#if __cplusplus >= 201103L
namespace std
{
 // We handle size_t, ptrdiff_t, and nullptr_t in c++config.h.
 using ::max_align_t;
}
#endif


Previously the g++ default was --std=gnu++98,
but gcc-6 changed the default to --std=gnu++14.

Ah yes.

And when building gcc-4.9, stage1 does not override that with
--std=gnu++98.

That has changed, and that triggers the latent bug.

Alright then, the patch is OK for trunk.

I might revert it once we stop using the buggy GMP in
contrib/download_prerequisites.

Reply via email to