https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89592
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to bin cheng from comment #4) > (In reply to Jakub Jelinek from comment #1) > > Started with r233126. Before that change, check2227 has not been NRV > > optimized, but now it is. That doesn't explain an ABI difference though. > > Hmm?? I am getting below error when building gcc-6-branch at commit > 6b94e1332a8322aff91b7ed88395b79080f5e30d > > cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’: > cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned > int)’ redeclared inline with ‘gnu_inline’ attribute > cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ > previously declared here > cfns.gperf: At global scope: > cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const > char*, unsigned int)’ used but never defined One needs to use CXX='g++ -std=gnu++98' to build older gcc revisions (those that are already using C++, but don't have fixed cfns).