This is the mail archive of the
gcc@gcc.gnu.org
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.20703@codesourcery.com> <32805.::ffff:128.194.146.35.1089667109.squirrel@webmail.nerim.net> <20040712142843.A7657@synopsys.com> <40F34A8D.2010601@gnat.com> <32794.::ffff:24.250.169.187.1089704266.squirrel@webmail.nerim.net> <40F3F25F.4070507@gnat.com>
I would remove from my subset overloading, any kind of
inheritance
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
too easily)
- 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.
Paolo