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

Daniel Kraft d@domob.eu
Fri Aug 22 09:05:00 GMT 2008


Tobias Burnus wrote:
> 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.

Do you  mean eliminating other globals as well?  If so, can you give me 
a pointer?

Otherwise, I'll introduce the parser-state in a follow-up patch I'm 
going to work on now.

> +  /* 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

This will also be part of it...  And yes, exactly that example was what 
I was thinking of with the comment :)

> Otherwise: OK for the trunk.
> Thanks for the patch.

You're welcome and thanks for the review!

Committed as rev 139425.

Cheers,
Daniel

-- 
Done:     Arc-Bar-Cav-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
To go:    Hea-Kni-Mon-Pri-Ran-Rog-Tou



More information about the Gcc-patches mailing list