Xref: utzoo comp.lang.fortran:4815 comp.unix.cray:258 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!cs.utexas.edu!uunet!mcsun!hp4nl!charon!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.fortran,comp.unix.cray Subject: Re: why has Cray dropped CPP support from cf77? Message-ID: <2989@charon.cwi.nl> Date: 20 Feb 91 02:27:55 GMT References: <1298@red8.qtp.ufl.edu> <1991Feb19.162007.28774@ncsa.uiuc.edu> <1991Feb19.203555.8262@craycos.com> Sender: news@cwi.nl Followup-To: comp.lang.fortran Organization: CWI, Amsterdam Lines: 37 > >In article <1298@red8.qtp.ufl.edu> bernhold@qtp.ufl.edu (David E. Bernholdt) writes: About Cray dropping support for .F > In article <1991Feb19.162007.28774@ncsa.uiuc.edu> hirchert@ncsa.uiuc.edu (Kurt Hirchert) writes: About scc taking over from cc. (I would say good riddance, cc is very bug- ridden.) In article <1991Feb19.203555.8262@craycos.com> pmk@craycos.com (Peter Klausler) writes: > It would appear infeasible to use an ANSI Standard C preprocessor or > preprocessing phase as a general cpp-like macro processor for Fortran or CAL. > Why? ANS C preprocessing is token-based, not character-based, and applies ANS C > tokenization to its input. This works fine for C, of course, but has some > trouble with Hollerith data, CAL's odd O' and X' syntax, apostrophes in Fortran > comments, etc. (Note that not all pre-ANSI cpp's where character-based.) But there is more to come. scc has the -E flag to only run the preprocessor. It will include #line directives (those are not a problem; you can filter them out), but it will not include them between source code lines, but in the middle! For example when the first line is: SUBROUTINE A that becomes: #line 1 .... SUBROUTINE A (note the line with 6 spaces on the line before #line :-)). Now tell the Fortran compiler about that! Of course you could correct that, but that is one more tool to be used different on the Cray. Another comment about the RS6000: yes, xlf does not use cpp, but you can use the preprocessor on fortran sources without ill-effects. Now commented assembler is completely different (because # also starts comments in the assembler). Pre-ANSI cpp's would have no problem with that if you did not put your comment # symbol in column one; with ANSI cpp's this is different. -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl