Re: comment and IBM xlf
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 20:01:01 +0000 (UTC)
Dave Seaman <dseaman@xxxxxxxxxxxx> wrote:
(snip on using cpp with XLF)
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.
Hmm, /* shouldn't normally exist in Fortran code, though it
might in comments.
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:
The favorite way to override such is to write a shell script
that supplies the appropriate options and use that instead of
the command it would otherwise use. I don't know if xlf.cfg
can do that.
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.
-P indicates not to generate # lines indicating the line number
in the original source file. These allow error messages to indicate
the proper file ane line number, at least for C compilers.
Maybe -C turns them off, also.
-- glen
.
- References:
- comment and IBM xlf
- From: Markus Franke
- Re: comment and IBM xlf
- From: glen herrmannsfeldt
- Re: comment and IBM xlf
- From: Dave Seaman
- comment and IBM xlf
- Prev by Date: Re: comment and IBM xlf
- Next by Date: text processing
- Previous by thread: Re: comment and IBM xlf
- Next by thread: Re: comment and IBM xlf
- Index(es):
Relevant Pages
|