This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Fortran] PR 32095: Check for using symbols before they are typed
- From: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- To: Daniel Kraft <d at domob dot eu>, Fortran List <fortran at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Aug 2008 22:14:40 +0200
- Subject: Re: [PATCH, Fortran] PR 32095: Check for using symbols before they are typed
Hi Daniel,
sorry for coming back to your patch that late.
+/* XXX: Do this with parser-state, for instance? I'd prefer this as it seems
+ cleaner to me than adding globals at will... */
Ditto. Thus I like your suggestion. But this is probably something
for a follow-up patch as one should then include also other variables.
+ "GNU Fortran extension: Symbol '%s' is used before"
There should be only one space after the colon. For consistency, one
probably should change "GNU Fortran extension:" to "Extension". (Though
I would also not mind to have all of them changed to "GNU extension".)
+ /* XXX: Need to check indices for EXPR_VARIABLE / EXPR_SUBSTRING, too. */
If you are looking for a stupid example: The following gives no error
with -std=f2003. Maybe leave it for now and change it into a FIXME?
subroutine foo(x,y,n)
implicit none
character(*) :: y
character(len=len(y(1:n))) :: x
integer :: n
end
+ /* XXX: Emit a warning if we add an IMPLICIT type here? */
I think this is not needed.
Otherwise: OK for the trunk.
Thanks for the patch.
Tobias