Re: kbuild & C++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Wed, 07 Sep 2005 11:21:42 +0200, Esben Nielsen said:

> I use a RTOS written in plain C but where you can easily use C++ in kernel
> space (there is no user-space :-). We use gcc by the way.

This isn't RTOS, in case you haven't noticed. ;)

> It has been done for Linux as well 
> ( Why can't this kind of
> stuff be merged into the kernel? Why is there no efford to do so??


"The code is installed by applying a patch to the Linux kernel and enables the
full use of C++ using the GNU g++ compiler. Programmers that have used C++ in
Linux kernel modules have primarily been using classes and virtual functions,
but not global constructors. dynamic type checking and exceptions. Using even
this small part of C++ requires each programmer to write some supporting
routines. Using the rest of C++ includes porting the C++ ABI that accompanies
GNU g++ to the Linux kernel, and to enable global constructors and destructors."

So let's see - no constructors, no type checking, no exceptions, and using
virtual functions requires the programmer to write the glue code that
programmers want to use C++ to *avoid* writing.  Sounds like "We stripped out
all the reasons programmers want to use C++ just so we can say we use C++ in
the kernel".

So, other than wank value, what *actual* advantages are there to using this
limited subset of C++ in the kernel?

Attachment: pgpRQUNv1VvTQ.pgp
Description: PGP signature

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux