This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Thoughts on Gengtype and Single Inheritance


On Thu, Aug 30, 2012 at 11:57 AM, Richard Henderson <rth@redhat.com> wrote:
> On 08/27/2012 11:58 AM, Lawrence Crowl wrote:
>>> > I wonder if the second discriminator support is easily generalizable
>>> > to enabling any derived class being a root class on it own with its
>>> > own subtree? If I understand correctly, the GTY syntax would be the
>>> > same.
>> If I understand correctly, you are suggesting multiple inheritance
>> via enums.  I think it is possible, but I think the tag syntax
>> would need to be changed to more directly associate the tag with
>> the variable.
>
> I understood Laurynas to be suggesting not multiple inheritance,
> but composition?

The coding convention recommends avoiding multiple inheritance, but it
did not ban it altogether.  I would be unfortunate that gengtype takes
the step of banning it -- by effectively not supporting it.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]