This is the mail archive of the
mailing list for the GCC project.
Re: Converting GCC to compilation with C++
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: gcc at gcc dot gnu dot org
- Cc: Joe Buck <joe dot buck at synopsys dot com>, Mark Mitchell <mark at codesourcery dot com>, gcc at gcc dot gnu dot org, nathan at codesourcery dot com
- Date: Tue, 13 Jul 2004 16:53:14 +0200
- Subject: Re: Converting GCC to compilation with C++
- References: <40F2C9D5.firstname.lastname@example.org> <32805.::ffff:email@example.com> <20040712142843.A7657@synopsys.com> <40F34A8D.firstname.lastname@example.org> <32794.::ffff:email@example.com> <40F3F25F.firstname.lastname@example.org>
I would remove from my subset overloading, any kind of
Inheritance seems to me the most rewarding point in switching to C++.
C++ without inheritance is strongly typed C.
, virtual functions
Given the current amount of hooking in GCC (target, host, language,
profiling, RTL) virtual functions seem worthwhile too.
I'd remove from C++, at least at first:
- function and operator overloading
- parameter references (would cause two different styles to get mingled
- implicit typedef of structs unless it is decided to fix it in all the
compiler like it was done for prototypes
- the `class' keyword
- methods, except for structs entirely made of virtual functions
- visibility modifiers (useless without methods)
- template specialization (but I'd be ok with cautious use of templates)
- multiple inheritance
- STL and iostreams
- any kind of exception handling
- new and delete usage would be hidden behind Bernardo's macros
Hm, is it C with virtual functions and single inheritance? I don't see
a problem with it.