[patch] Have cc1 define a __GFORTRAN__ macro when -lang-fortran is used
FX Coudert
fxcoudert@gmail.com
Sun May 6 22:06:00 GMT 2007
*ping*
> Attached patch makes cc1 define the __GFORTRAN__ macro as equal to 1
> when it is passed the -lang-fortran option. This option is used when
> the driver decides (or is told ) to preprocess a Fortran file. The
> changes are minimal: we already had a lang_fortran variable that says
> whether -lang-fortran was passed, so we simply need to make it visible
> from c-cppbuiltin.c, where we actually define the macro.
>
> The patch is bootstrapped with C and Fortran on i686-linux. An earlier
> version regtested fine, and this regression-test for this one is
> almost done.
>
> OK for mainline?
2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR driver/31694
* gcc/c-opts.c (lang_fortran): Make it non static.
* gcc/c-common.h (lang_fortran): New prototype.
* gcc/c-cppbuiltin.c (c_cpp_builtins): Create a __GFORTRAN__
if the -lang-fortran option was passed by the driver.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfortran_macro.diff
Type: application/octet-stream
Size: 1323 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070506/1a668a81/attachment.obj>
-------------- next part --------------
More information about the Fortran
mailing list