Messages in this thread | | | Date | Mon, 24 Apr 2006 23:36:18 +0200 | From | "J.A. Magallon" <> | Subject | Re: Compiling C++ modules |
| |
On Mon, 24 Apr 2006 21:45:46 +0100, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote: > makes without exceptions being used. It might be possible to move to a > strict C++ subset in the style of Apple but there isn't much interest in > this. >
Probably there will be two fields where a subset of C++ would give a big save to the kernel: - All that 'hand-coded' object orientation ans inheritance makes tons of structs repeating function pointers and the like, and using tricky rules to be sure nobody creates a class without a pure virtual method (funtion pointer). Binary space. - You are doing in source code what the compiler should do for you.
> There are other problems too, notably the binary ABI between the C and C > ++ compiler might not match for all cases (in particular there are > corner cases with zero sized objects and C++). >
There is no point in interfaccing C and C++. But a full C++-subset kernel would be equally fast and probably safer to write code for that this.
But things are like they are. Kernel is C.
-- J.A. Magallon <jamagallon()able!es> \ Software is like sex: werewolf!able!es \ It's better when it's free Mandriva Linux release 2006.1 (Cooker) for i586 Linux 2.6.16-jam9 (gcc 4.1.1 20060330 (prerelease)) #1 SMP PREEMPT Tue [unhandled content-type:application/pgp-signature] | |