http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42954
--- Comment #7 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> 2010-09-26 13:44:10 UTC --- After some auditing: TARGET_OBJFMT_CPP_BUILTINS is safe (it's only called in config/elfos.h and config/alpha/elf.h, and contains a single, unconditionnal call to builtin_define()). Regarding TARGET_OS_CPP_BUILTINS, definitions in the following files may not be safe for the Fortran front-end: alpha/linux.h: c_dialect_cxx alpha/osf5.h: c_dialect_cxx arm/vxworks.h: arm_arch_xscale, arm_arch5, arm_arch4, thumb_code cris/linux.h: flag_leading_underscore i386/cygming.h: flag_iso i386/darwin.h: darwin_cpp_builtins i386/i386-interix.h: preprocessing_asm_p, c_dialect_cxx, c_dialect_objc i386/netware.h: flag_iso ia64/hpux.h: c_dialect_cxx, flag_iso mips/iris6.h: flag_isoc99, c_dialect_cxx, flag_iso mips/linux.h: c_dialect_cxx mips/netbsd.h: mips_abi pa/pa-hpux.h: c_dialect_cxx, flag_iso, preprocessing_trad_p pa/pa-hpux10.h: c_dialect_cxx, flag_iso, preprocessing_trad_p, flag_pa_unix pa/pa-hpux11.h: c_dialect_cxx, flag_iso, preprocessing_trad_p, flag_pa_unix, flag_isoc94, flag_isoc99, pa/pa.h: c_dialect_cxx, flag_iso rs6000/darwin.h: darwin_cpp_builtins rs6000/sysv4.h: target_flags_explicit sol2.h: c_dialect_cxx (each time, I give the list of variables/functions which may not be accessible from the Fortran front-end). One thing we could do is wrap all that with some IS_INSIDE_C_FAMILY_FRONTEND macro, so that it's just protected in Fortran and potentially other languages. Or we double the work and split TARGET_OS_CPP_BUILTINS into TARGET_OS_CPP_CFAMILY_BUILTINS and TARGET_OS_CPP_OTHERLANG_BUILTINS (you get the idea). I still have to audit TARGET_CPU_CPP_BUILTINS, but I'm running out of time for today.