This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Mark Mitchell's 15-May toplev.c patch breaks some Fortran statement functions
>>>>> Mark Mitchell <mark@markmitchell.com> writes:
> Why exactly did you check in this patch? I dimly remember preparing
> it, and claiming it had a purpose, but I don't any more remember what
> it was.
It's not actually needed by C++ now. It would be needed by C++ if
decl_function_context worked properly for C++ and we removed the hacks
currently in the frontend to work around the fact that it doesn't work.
The problem is that if a nested function is deferred, we don't get back to
it until end-of-file, at which point its RTL has been thrown away. On the
other hand, this hasn't been a problem for C, so perhaps it's just a matter
of fixing C++ to handle forcing out nested functions like C does.
I don't know why the change would be breaking Fortran, tho. If it's
difficult to fix, go ahead and revert the change.
Jason