Peter Shenkin writes:
> No way. Common blocks are supposed to be overlayable.
> Always have.
And there were implementations that did overlay them...
and programs that took advantage of it. This was before the
days of virtual memory, when you had to do memory management
manually, and when memory was a precious resource. You
*NEEDED* to be able to overlay some common blocks on some
implementations.
To my knowledge, no current compilers do this, but past ones
certainly did. Perhaps future ones will again when architectural
tradeoffs are again different.
There have been some suggestions to remove this stuff from future
revisions of the standard, essentially making all common blocks
(and module variables) saved. I can't make a good guess as to
whether or not those suggestions will be adopted. I personally
do have some concern on making a change like that based solely
on today's architectures.
We know that overlaying common was important in some cases in the
past (I took advantage of it in some of my own code). Perhaps
its current uselessness is only temporary.
It isn't like adding a save statement for each common is a big
cost in coding. In my later f77 days, after I was no longer
overlaying common, I just habitually added a save statement for
every common, almost as part of how I spelled common. It went in
the same include file as the rest of the declarations for that
common. (If you are using common without include, then we have
a *LOT* more important issues to discuss than the save statement. :-()
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|