[gfortran] Add a global symbol table

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Tue Jun 29 21:06:00 GMT 2004


Paul Brook wrote:
> We already have a global namespace for intrinsic subroutines. See 
> gfc_intrinsic_namespace in intrinsic.c.
> Could/Should this be be merged with your proposal? 

I hadn't seen that before. Looking over it, I don't think they should be
merged (at least not at this time), for several reasons:
1. a namespace is overkill for the purpose of the global symbol table.
(If we were to store formal argumetn lists in it, we would still have to
have formal namespaces associated with each global symbols, so I see no
possible future savings in arranging those names in a namespace)
2. with my patch to common handling, I have started to separate out the
names of COMMONs from the rest of symbol handling, I don't think
gfc_intrinsic_namespace could be extended to this without evil work on
how the way symbols are handled there, or forfeiting the purpose of that
other patch.
3. the namespace for intrinsics is overkill, at least it appears to be
so to the extent I looked at the code. AFAICT it is only used to store
the name of the intrinsic. I haven't yet thought through if it were
preferable to store those names in the global symbol table, but this can
be done after my patch is in.

For this, I think my patch is reasonable even in spite of the existence
of gfc_intrinsic_namespace, and doesn't collide with a rethinking how
the names/symbols of intrinsics should be stored. I will commit after
applying the patch to a clean tree and testing.

- Tobi



More information about the Gcc-patches mailing list