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: Converting GCC to compilation with C++


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


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