lkml.org 
[lkml]   [2006]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: C++ pushback
On Wed, 2006-04-26 18:00:52 -0500, Roman Kononov <kononov195-far@yahoo.com> wrote:
> Statement expressions are working fine in g++. The main difficulties are:
> - GCC's structure member initialization extensions are syntax
> errors in G++: struct foo_t foo={.member=0};

Erm, you may want to read the current C standard (C99). This isn't an
extension, it's standard.

There's a reason why C++ doesn't support that (yet): C++ is a fork of
C90 (IIRC), so everything that evolved in C during the years is still
missing from C++.

> > Anyway, it should all be doable. Not necessarily even very hard. But I
> > doubt it's worth it.
>
> I think that allowing C++ code to co-exist with the kernel would be a
> step forward.

You can do with your code whatever you want to:) I think it's just a
matter of practice: If C++ code shows up that is less error-prone than
C code, doesn't use unverifyable amounts of stack space during
constructor runs and is basically _superior_ to C code, that'll find
its way into the kernel. But if it's only as good as the C code, then
why should anybody bother implementing the neccessary stuff to link
C++ code (and to initialize it properly?)

MfG, JBG

--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
für einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2006-04-27 09:58    [W:0.137 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site