https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66829
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- We either need to change how we build testsuite_shared.cc, or change what goes into it. --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -668,7 +668,7 @@ proc v3-build_support { } { # Compile with "-w" so that warnings issued by the compiler # do not prevent compilation. if { [v3_target_compile $srcdir/util/$f $object_file "sharedlib" \ - [list "incdir=$srcdir" "additional_flags=-fno-inline -w -shared -fPIC -DPIC"]] + [list "incdir=$srcdir" "additional_flags=-fno-inline -w -shared -fPIC -DPIC -std=gnu++98"]] != "" } { error "could not compile $f" }