Silverfrost Forums

Welcome to our forums

c style preprocessor

23 Apr 2008 11:38 #3072

Hi

I've just downloaded the personal evaluation version of ftn95 and tested it by trying to compile legacy code which has c-style pre-processor statements. It appears that these statements are interpreted corrected for free format source files but not for fixed format source files i.e. the compiler complains that the first column is occupied by a non numeric character. If the c-style ifdef statement is modified to start at column 7, then it is interpreted correctly. However, if gcc is then used to pre-process source when the statement begins at column 7, the statement is ignored.

Based on this, I think the c-style pre-processor ifdef statement may be implemented incorrectly for fixed format source i.e. the compiler should not complain about the first column being a non numeric character when this character is meant for the pre-processor.

The current work around is to use gcc under cygwin with the -E -P flags to pre-process all the source before invoking the ftn95 compiler.

Best regards

23 Apr 2008 1:07 #3074

I think that we could peobably do this quite easily but not in time for the next release.

2 May 2008 1:02 #3133

C-style preprocessing directives can now appear in the fixed format label field except for #include which must start in column 7 or after.

This change will not be included in version 5.21 - the next release.

Please login to reply.