[RFC] Constructor patch

Tobias Burnus burnus@net-b.de
Sat Oct 30 09:49:00 GMT 2010


Mikael Morin wrote:
> I have only had a quick look at your patch.
> It seems you are adding both the derived type and the constructors to the
> generic list. Why do you need the lowercase/uppercase trick then ? Both the
> derived type and the constructor can be accessed by seeking in the generic
> list which itself is accessible in the namespace by a single gfc_symtree slot.
> Or am I missing something ?

I think I once tried to only do a
   gfc_new (gfc_symbol)
without creating a symtree; however, that was failing at other parts, 
which assume that every symbol has a symtree entry. I think when I tried 
it, it broke already for a single scoping unit - but I would assume that 
one also needs to heavily modify module.c. I am sure it will work, but I 
had the feeling that it will be more effort for little gain. The gain is 
that one avoids the capital letter trick and the difference between the 
symtree name and the symbol name. However, it creates a new imbalance: 
symbols which have a symtree vs. symtrees which have not.

Tobias



More information about the Fortran mailing list