This is the mail archive of the
mailing list for the GCC project.
Re: FORTAN: PATCH FOR PR #10843
Bud Davis wrote:
Toon Moene wrote:
GO TO 3
*** gcc/gcc/f/sta.c 17 Oct 2001 22:34:52 -0000 1.11
--- gcc/gcc/f/sta.c 18 May 2003 22:15:05 -0000
*************** ffesta_second_ (ffelexToken t)
*** 954,959 ****
--- 954,960 ----
ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_dummy);
+ case FFESTR_firstGO:
ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto);
It's more complicated than that - you have to make sure that it's
actually followed by "TO". See somewhat more to the beginning of the
function on how to handle that - FFESTR_firstEND
i am not sure where to go when the first token is a GO and the second
not a TO. calling it an assignment statement seemed like a good idea,
but the error message is less then ideal :
gives this diagnostic
g.f: In program `MAIN__':
Invalid form for assignment statement at (^)
With the current implementation it gives:
Unrecognized statement name at (1) and invalid form for assignment or
statement-function definition at (2)
which is not that much more clear.
maybe calling it a possible goto (ffesta_add_possible_exec_
((ffelexHandler) ffestb_goto);) is the right way to go ?
Yes, please try that and see what happens.
Thanks for your debugging and testing work !
Toon Moene - mailto:firstname.lastname@example.org - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)