[Developers] Token concatenation in Fortran

Erik Schnetter schnetter at cct.lsu.edu
Fri Oct 7 10:28:42 CDT 2005


On Oct 7, 2005, at 04:03:08, Tom Goodale wrote:

> I must admit I've never seen the other two problems Erik mentions -  
> Erik, are these just hypothetical or do you have concrete  
> examples ?  I could imagine them happening if you use a c compiler  
> in preprocessing mode, but the only standalone cpp I can think of  
> encountering which does more than macro replacement is the GNU cpp  
> in non-traditional mode, or in 2.6 in all modes, where it randomly  
> removed spaces.

With "2.6", you probably mean Red Hat 2.6?  Or maybe gcc 2.96, which  
was an "inofficial" Red Hat release?  The problem with "cpp - 
traditional" doing the wrong thing also existed in some official  
3.0.x releases, but is fixed in the latest 3.0.x release and all  
following ones.

I've submitted a patch to TestMacros containing "realistic" Fortran  
code that can lead to the problems I describe.  The labels-with- 
macros one is even in the FAQ.  I got the dots-around-operators from  
a comment in some Fortran code, where the author insisted on spaces  
in particular places because "preprocessing breaks otherwise", but  
the author didn't understand why.  I forgot in which thorn this was.   
Quotes in strings are used in various places.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20051007/f641bb7c/attachment.bin 


More information about the Developers mailing list