On Sun, 2 May 2021, 09:38 Jonathan Wakely, <jwakely.gcc@xxxxxxxxx> wrote: > > > On Sun, 2 May 2021, 07:59 Xi Ruoyao via Gcc-help, <gcc-help@xxxxxxxxxxx> > wrote: > >> >> >> I think mixing "-std=c++0x" and "-ansi" does not make sense: -ansi means >> C++98. And in GNU C++ standard library, std::basic_string's ABI is >> different in C++98 and C++11 (or above). > > > > No it isn't. > However it's true that mixing -std=c++0x and -ansi doesn't make sense, because the later option overrides the former, so it just means -ansi which means -std=c++98. But anyway, that is a linker command that doesn't compile anything, it just links a .o to libraries. So both options are ignored and so is that huge list of warnings. Those options only do anything when compiling source code, not when linking objects.