This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/29813] -std=F95/F2003: Warn or error when using a non-declared variable with implicit none



------- Comment #3 from tobi at gcc dot gnu dot org  2007-10-05 21:47 -------
Sorry if I appear talking to myself, alternative fixes that I pondered, and
that may be cleaner, would be the following:

- record both the place where a symbol is given a type and where it is first
used.  Then verify that the former precedes the latter.
- in a type declaration statement, make sure that the object hasn't been used
yet.

Coming to think of it, the second option may probably be implemented with very
little effort.  If it doesn't, it may be the case that it can be made to work
very simply if we recorded whether a symbol's value has been read, as opposed
to only recording whether it has been referenced as we do currently.  This is
also interesting because of uninitialized warnings and may therefore be the
right way to proceed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29813


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