Saturday, June 28, 2008

Why f77 of Sun Studio 12 cannot find this syntax error?

g77 in Cygwin can find the error:

psdsios.f: In program `psdsios':
psdsios.f:90:
integer*4 i,j,k,l,m,n
1
psdsios.f:119: (continued):
INTEGER*4 jmax,n,nout,np,nmax
2
Invalid declaration of or reference to symbol `n' at (2) [initially seen at (1)]
In file included from psdsios.f:81:


However, this program compiles well in Solaris using f77 of Sun Studio 12.

1 comment:

Anonymous said...

Try using -ansi flag with Sun Studio 12.

ANSI: "N" has been given the INTEGER*4 attribute more than once. This is nonstandard.