From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,251f6aad76e3546e X-Google-Attributes: gid1164f8,public From: hays@math.arizona.edu (Mark Hays) Subject: Re: f77/cpp bug? Date: 1995/08/10 Message-ID: <40d9v0$5ua@cortaro.math.arizona.edu>#1/1 X-Deja-AN: 107906665 references: <409n4u$3j4@cortaro.math.arizona.edu> organization: Mathematics Department, University of Arizona newsgroups: comp.sys.dec Hi Dan, In article , Dan Pop 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