[PATCH, Fortran] PR 32095: Check for using symbols before they are typed

Tobias Burnus tobias.burnus@physik.fu-berlin.de
Thu Aug 21 20:42:00 GMT 2008


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



More information about the Gcc-patches mailing list