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: Does GFortran Report Use of Undefined Variables?


On Apr 16 2012, Tobias Burnus wrote:
Craig Dedo wrote:

Everyone: Does GFortran report (i.e., generate error messages) references to undefined variables during execution? If so, what command options do I need to use in order to get GFortran to generate such error messages?

No, it doesn't. It would require to add a check before every statement, which is both slow and laborious to implement. Though, we might add something like that in future. (I think only NAG's compiler has a more extensive support for such kind of diagnostic.)

I believe that to be true. WATFIV and some other compilers did, too, but that is ancient history. As far as I know, currently all other undefined variable detection is the useless form of detecting only the obvious causes. I use NAG Fortran for teaching, and tell students that it is by far the best debugging and checking compiler.

Regards,
Nick Maclaren.



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