This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29671] preprocessor statements must start in column 1
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2006 12:48:41 -0000
- Subject: [Bug fortran/29671] preprocessor statements must start in column 1
- References: <bug-29671-6552@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2006-10-31 12:48 -------
The problem is that gfortran calls "cpp" with the -traditional-cpp option.
This causes some more modern constructs not to work and it also is the reason
behind your problem. (cf. PR 28662).
We need to use -traditional-cpp since "some tokens in C are not
tokens in Fortran so you could get the wrong result." (A.P. in the other PR)
The solution is to modify cpp to know fortran tokens (when called with
-lang-fortran).
Note this problem is not limited to gfortran; e.g. the NAG f95 compiler uses
Sun's public-domain fpp (netlib.org/fortran/), which has similar problems.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29671