newlib uses extern "C" wrappers in its headers, so GCC can be told it is C++ compatible.
this patch fixes : FAIL: g++.dg/lookup/builtin5.C -std=c++11 scan-assembler _ZSt5atanhd t Tested om the 4.7 and 4.8 branches, OK for both ? nb: newlib can be added to the list of runtimes that need it (see http://gcc.gnu.org/ml/gcc-patches/2012-06/msg01164.html), in case this macro is removed in the future. Thanks Christian
2012-09-04 Christian Bruel <christian.br...@st.com> * config/sh/newlib.h (NO_IMPLICIT_EXTERN_C): Define. Index: config/sh/newlib.h =================================================================== --- config/sh/newlib.h (revision 190714) +++ config/sh/newlib.h (working copy) @@ -23,3 +23,7 @@ #undef LIB_SPEC #define LIB_SPEC "-lc -lgloss" + +#undef NO_IMPLICIT_EXTERN_C +#define NO_IMPLICIT_EXTERN_C 1 +