From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17340 invoked by alias); 26 Sep 2010 13:44:27 -0000 Received: (qmail 17330 invoked by uid 22791); 26 Sep 2010 13:44:26 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID,TW_CX,TW_FX X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 26 Sep 2010 13:44:22 +0000 From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/42954] [4.5 regression] TARGET_*_CPP_BUILDINS issues with gfortran X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fxcoudert at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 26 Sep 2010 17:47:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg02837.txt.bz2 Message-ID: <20100926174700.nWOCajzxsLB6Vf8esF02wlIJmLrcqvDqBcU-LkxUjt0@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42954 --- Comment #7 from Francois-Xavier Coudert 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.