This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Does GFortran Report Use of Undefined Variables?
- From: "N.M. Maclaren" <nmm1 at cam dot ac dot uk>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Craig Dedo <craig at ctdedo dot com>, GNU Fortran <fortran at gcc dot gnu dot org>
- Date: 16 Apr 2012 21:10:30 +0100
- Subject: Re: Does GFortran Report Use of Undefined Variables?
- References: <!&!AAAAAAAAAAAYAAAAAAAAADwWT6ZWSIFJsr5qVFz+64/CgAAAEAAAAO7c8iieWn1BgmJ5d8WZQSIBAAAAAA==@ctdedo.com> <4F8C6DE8.5040907@net-b.de>
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.