https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66319
John David Anglin <danglin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at redhat dot com --- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> --- Actually, the error was introduced by this change: 2015-05-26 Jason Merrill <ja...@redhat.com> * configure.ac: When bootstrapping with GCC, add -std=c++98 to CXX. * configure: Regenerate. This affects the hpux11 builtin defines: if (flag_pa_unix >= 1995 && !flag_iso) \ { \ builtin_define ("_XOPEN_UNIX"); \ builtin_define ("_XOPEN_SOURCE_EXTENDED"); \ } \ Probably, we want the XOPEN stuff for c++98 and later, but the bootstrap problem can only be fixed by changing bootstrap compiler. We get the "wrong" declaration for nftw when _XOPEN_SOURCE_EXTENDED isn't defined. So, I think a configure fix is needed. I noticed in testing that -std=c++98 is not used in stage2 and we don't seem to have the same language defaults there.