This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: suggestion about g77


Steve Kargl wrote:
Redundant appearances of an item are not permitted.

   A SAVE statement without a list is treated as though it contained the
   names of all allowable items in the program unit.

IMHO, I don't think it's debatable.  The above statements are fairly
explicit that "redundant appearances" are forbidden and a naked
SAVE includes "all allowable items".

     program a
     save i
     save
     end

"i" appears in two save statements.

No - "i" only appears in one. However, the second save statement is to be treated as though it contained "i", such that i gains the save attribute.

I agree that this is fairly pedantic, but that's what the standard says. It may
well be that the standard intended to say something else, but as written, it doesn't.


Not that I have anything riding on this - it was just the fact that NAG seemed to think the code was F77-compliant, and I trust their judgment on such matters over mine :-)

Toby

--
Dr. Toby White Dept. of Earth Sciences, Downing Street, Cambridge CB2 3EQ. UK
Email: <tow21@cam.ac.uk>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]