preprocessor token "#" doesn't work in gfortran as in gcc, intel-fortran or sun-fortran compiler
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Jun 10 20:54:00 GMT 2009
On Wed, Jun 10, 2009 at 10:29:16PM +0200, Maik Beckmann wrote:
> Tim Prince schrieb am Mittwoch 10 Juni 2009 um 19:57:
> > Maik Beckmann wrote:
> > >
> > > Is there a command line switch to force gfortran to use the current gcc
> > > cpp?
> >
> > I haven't heard of any such thing. Why would anyone support it? You
> > could simply use the gcc pre-processing without -traditional, if you don't
> > care about breaking Fortran string concatenation.
>
> If all compilers would behave behave the same way it wouldn't an issue. But
> having to maintain something just for gfortran is just inconvenient.
>
> ifort and sunf95 both take
> -fpp
> to preprocess a source file while gfortran wants
> -cpp
> ifort and sunf95 both use the standard cpp
> #define TO_STR(EXPR) #EXPR
> while gfortran wants
> #define TO_STR(EXPR) "EXPR"
>
> No show stoppers at all, but inconvenient.
>
Have you asked Intel and Sun to support the gfortran
syntax and feature?
--
Steve
More information about the Fortran
mailing list