Fortran MAIN__

View: New views
2 Messages — Rating Filter:   Alert me  

Fortran MAIN__

by Aleksej Saushev-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

  Hello!

Can anyone enlighten me, why do we do this stupid thing at all:
first we force all Fortran files to require linking with MAIN__,
then we patch all Fortran packages to include dummy MAIN__?

Why cannot we simply not requiring it at the first place?


--
HE CE3OH...


Re: Fortran MAIN__

by Aleksej Saushev-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Aleksej Saushev <asau@...> writes:

> Can anyone enlighten me, why do we do this stupid thing at all:
> first we force all Fortran files to require linking with MAIN__,
> then we patch all Fortran packages to include dummy MAIN__?
>
> Why cannot we simply not requiring it at the first place?

All my research work doesn't bring results, I can track problems with
this MAIN__ back to late 90s, but I still can't find explanation why
this "-u MAIN__" exists. On the other hand, I see that people work
around the arising problems by removing this flag from "fc" script.

Thus I propose to remove "-u MAIN__" flag and I'm going to remove it
at the next update (I'll wait a week or two), unless anyone brings up
enough reasons why it should stay.

'Cause the only reason I can imagine is a kind of "protection" by
requesting a programmer to link Fortran code with Fortran code.
This is useless, in my opinion, since programmer will be reminded by
the very same linker about missing Fortran MAIN__, if forgotten.
And "C" main() will override it.


--
HE CE3OH...