Multiple inheritance

Jason Merrill jason@cygnus.com
Mon Dec 1 18:46:00 GMT 1997


>>>>> Joshua S Allen <allen@eecs.tulane.edu> writes:

> I am making modifications to the gnu g++ compiler to include automatic
> conflict resolution of multiple inheritance using a linearization
> algorithm.

What do you mean?
 
> (1) I need to construct a table of direct parents of a class.  Whereas this
> could easily be done at parse time, it is presenting me with problems and I
> was wondering if you could direct me to how this information could be
> extracted from the parse tree.

TYPE_BINFO_BASETYPES (type) is a vector of the direct bases.
 
> (2) I am adding the algorithm within the function lookup_fnfields
> (cp/search.c) where
>         errstr = "request for method %D' is ambiguous"; 
 
>     Once I locate the method in a class, what is the format of the return
> value I give to the calling function.  I need a way of telling the calling
> function the particular method within a specific class to use.
 
lookup_fnfields returns a list where the PURPOSE is the basetype where the
functions are found, and the VALUE is the list of functions.

Jason



More information about the Gcc mailing list