Re: Compiling C++ modules
From: J.A. Magallon
Date: Mon Apr 24 2006 - 17:36:21 EST
--Sig_OCIKsNQ6jiBa5VqZrCd0AZu
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
On Mon, 24 Apr 2006 21:45:46 +0100, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wro=
te:
> 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 se=
x:
werewolf!able!es \ It's better when it's fr=
ee
Mandriva Linux release 2006.1 (Cooker) for i586
Linux 2.6.16-jam9 (gcc 4.1.1 20060330 (prerelease)) #1 SMP PREEMPT Tue
--Sig_OCIKsNQ6jiBa5VqZrCd0AZu
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFETUTSRlIHNEGnKMMRAg9SAKCukJkNUNJ/8e3YqTVrX5r9DXdCogCcDixl
1P0lo+HYoD/vUY6ZjLc4UZ0=
=xnAH
-----END PGP SIGNATURE-----
--Sig_OCIKsNQ6jiBa5VqZrCd0AZu--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/