Using C++ in GCC is OK

Gabriel Dos Reis
Mon May 31 15:35:00 GMT 2010

On Mon, May 31, 2010 at 10:03 AM, Richard Guenther
<> wrote:
> On Mon, May 31, 2010 at 4:58 PM, Gabriel Dos Reis
> <> wrote:
>> On Mon, May 31, 2010 at 3:42 AM, Basile Starynkevitch
>> <> wrote:
>>> On Mon, May 31, 2010 at 01:39:08AM -0500, Gabriel Dos Reis wrote:
>>>> On Mon, May 31, 2010 at 12:28 AM, Basile Starynkevitch
>>>> <> wrote:
>>>> > At last, there is a very important issue when switching to C++. What is
>>>> > our "ideal" class hierarchy?
>>>> The ideal class hierarchy is independent of the language used.  The language
>>>> matters only to the extend that it provides direct support (or lack thereof) to
>>>> express that hierarchy.
>>> I fully agree (and indeed we could have a quite clean class hierarchy
>>> in C, like GTK have),
>> and as a matter of fact, we do already have a class hierarchy.  The issue there
>> I suspect is whether its expression in C is faithful.
>>> but a transition to C++ could also be the time
>>> for defining more properly our type or class hierarchies.
>> yes, it definitely is an opportunity to revise the design as we are revisiting
>> the area, but that should be orthogonal to the rest.
> And we definitely should not do so just because we can.  I see
> little value in turning our tree upside-down just because we now
> can use C++ and make everything a class rather than a union.

I was not arguing for redefining the tree hierarchy -- just pointing
out that Basile's
original question is independent of the language use.  Whether we
actually decide to
redesign it, in my mind, is an orthogonal issue.  There are values to
have them as
C data types (with all the funny things we have been doing), and also
to convert them to
a C++ class hierarchy.  Which approach is chosen should depend on the merits.

More information about the Gcc mailing list