From: hays@math.arizona.edu (Mark Hays)
Subject: Re: f77/cpp bug?
Date: 1995/08/10 [thread overview]
Message-ID: <40d9v0$5ua@cortaro.math.arizona.edu> (raw)
In-Reply-To: danpop.808014191@rscernix
Hi Dan,
In article <danpop.808014191@rscernix>, Dan Pop <Dan.Pop@mail.cern.ch> wrote:
>[my jabber deleted]
>Have you actually tried to compile a .F file which contains // with f77
>and had problems? I have only f90 installed and I never had this problem
>because the compiler does the right thing: it invokes cpp with whatever
>magic options are required to disable the C++ comments:
>
> ues5:~/tmp 499> cat foo.F
> print *, "foo" // "bar"
> end
> ues5:~/tmp 500> f90 foo.F
> ues5:~/tmp 501> ./a.out
> foobar
>
Yes, you are right -- after a closer examination, I find
that DEC f77 actually invokes /usr/lib/cpp89, which only
removes C++ comments if you give it the right flags! The
problem is that the makefiles I have for this particular
piece of software call /usr/lib/cpp directly. It never
occurred to me that there might be *two* cpp's running
around. Got a little ahead of myself on this one -- sorry.
>I complained to DEC about the (broken, IMHO) _default_ behaviour of cpp
>WRT C++ style comments (it breaks utilities like xrdb if you have URL's
>in your .Xdefaults), but their answer was:
Ouch. Yes, that is bad.
> Here is the feedback we received from Engineering concerning the "cpp"
> behaviour which makes you feel unhappy.
>
> After careful reflection, they decided to leave the "C++ comment style"
> functionnality of "cpp" unchanged.
>
That's too bad. Most vendor's seem to do it like cpp89 --
you can enable this feature if you want to. I agree with
you: it isn't such a good idea to have this on by default,
especially with no way to turn it off.
Thanks,
Mark
next prev parent reply other threads:[~1995-08-10 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-08-09 4:00 f77/cpp bug? Mark Hays
1995-08-10 4:00 ` Dan Pop
1995-08-10 4:00 ` Mark Hays [this message]
1995-08-11 4:00 ` John Hascall
1995-08-11 4:00 ` Craig Neth USG
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox