Re: comment and IBM xlf
- From: Dave Seaman <dseaman@xxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 19:12:34 +0000 (UTC)
On Thu, 28 Sep 2006 18:04:39 +0000 (UTC), glen herrmannsfeldt wrote:
Markus Franke <Markus-Franke@xxxxxx> wrote:
I have Fortran 90 code and want to include a file (config.h) with
C-style comments, like /* */. When I try compile the file with IBM XLF
10.1 Compiler I get the following error messages:
I am pretty sure that the C preprocessor processes C comments, so it
seems that the compiler is looking at it before passing it to cpp.
You might try running cpp separately, and then sending the output
to XLF. I don't know if Fortran continuation lines will survive cpp,
though.
Try man cpp on a unix system.
The problem is that when xlf invokes cpp, it specifies the -C option,
which means "do not discard comments." This is controlled by the file
/etc/xlf.cfg, which contains the line
cppoptions = -C
among its default settings. Don't ask me why that was thought to be a
good idea.
I don't see a way to turn that option off on the command line, once it
has been enabled, but you can specify a different config file if you
like, perhaps something like:
grep -v cppoptions /etc/xlf.cfg >myconfig
xlf -Fmyconfig foo.F
Of course, you can also use
cpp -P foo.F foo.f
xlf foo.f
My experiments indicate that you need the -P option here, even though
it's not specified in /etc/xlf.cfg.
--
Dave Seaman
U.S. Court of Appeals to review three issues
concerning case of Mumia Abu-Jamal.
<http://www.mumia2000.org/>
.
- Follow-Ups:
- Re: comment and IBM xlf
- From: glen herrmannsfeldt
- Re: comment and IBM xlf
- References:
- comment and IBM xlf
- From: Markus Franke
- Re: comment and IBM xlf
- From: glen herrmannsfeldt
- comment and IBM xlf
- Prev by Date: Re: Stack size, and warnings
- Next by Date: Re: Stack size, and warnings
- Previous by thread: Re: comment and IBM xlf
- Next by thread: Re: comment and IBM xlf
- Index(es):
Relevant Pages
|
|