On Mon, Aug 22, 2016 at 11:54 PM, Pedro Alves <pal...@redhat.com> wrote: > On 08/22/2016 10:26 PM, David Malcolm wrote: > >> it has no problems, whereas with the default for gcc 5 and earlier: >> >> $ gcc -c test.cc -std=gnu++98 >> test.cc:3:15: warning: non-static data member initializers only >> available with -std=c++11 or -std=gnu++11 >> int field = 42; >> ^~ >> >> So it's probably worth attempting to bootstrap with an older gcc as the >> starting compiler. > > I believe that only stage 1 is built with -std=gnu++98 forced, and also > stage 1 is built without -Werror, so I think you'd need to start with a > compiler that predates support for that construct, not just one > that predates the flip of the default.
Uh, so we don't actually catch these errors during bootstrap with a too recent host compiler? That's pretty bad. Ah, we add -pedantic if supported but with now using C++ that only warns and does not error (the C FE errors) so we actually need -pedantic-errors here. So should we change config/warnings.m4:ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC to use -pedantic-errors? In the end conditionally allowing C++11 code in stage2+ was a mistake if we can't catch this kind of issues reliably. Richard. > Thanks, > Pedro Alves >