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. So it might cause the > following problems. > > To link your code, header_edit.o and PatternDriver.a must be compiled > with a consistent string ABI, i. e. both compiled with -std=c++98, or > both compiled with -std=c++0x or above. > That's wrong. The choice of std::string ABI is independent of -std modes, and the default ABI is the same for all modes.