On Wed, 21 Mar 2018, Nathan Sidwell wrote: > Unfortunately it's a negative-sense define, that now at least most ports > define. Do all ports define it? It's hard to determine that, because many > ports get it set via config/gnu-user.h or similar common file.
Bare-metal ports often fail to define it. As far as I know, newlib headers at least do not require implicit extern C. If there are any that are missing explicit extern C, I'd rather that was addressed by (a) fixing them and (b) adding fixes in fixincludes if we wish to work with older header versions. My list from 2005 of targets not defining NO_IMPLICIT_EXTERN_C then is <https://gcc.gnu.org/ml/gcc/2005-05/msg00377.html>. I think this should become a target hook, where the default is implicit_extern_c returning false and only AIX (and any other OSes requiring it) sets the hook to return true. > It also has the following undocumented features (when not set): Whether these are needed would depend on the properties of headers for OSes setting the hook to return true. Even if needed, one might consider fixing such header issues with fixincludes as a replacement for those features in the compiler. -- Joseph S. Myers jos...@codesourcery.com