lkml.org 
[lkml]   [2000]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Criticism] On the discussion about C++ modules
Date

[Eray Ozkural]
> I can't say whether putting libstdc++ in a kernel module is a bad thing
> before I see one. This is a skel. code:

> -rw-r--r-- 1 root root 271528 Oct 10 09:54 /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
> orion:opt$ ls -al /usr/lib/libstdc++-3-libc6.2-2-2.10.0.a
> -rw-r--r-- 1 root root 476494 Oct 10 09:54 /usr/lib/libstdc++-3-libc6.2-2-2.10.0.a

Don't forget to include libc.so here -- you know libstdc++ won't run
without it. Let's see ... Debian-unstable glibc 2.1.95 here ...

-rwxr-xr-x 1 root root 1057576 Oct 13 13:45 /lib/libc.so.6
-rw-r--r-- 1 root root 2445036 Oct 13 13:47 /usr/lib/libc.a

Heh.

> > - <const &> args : dont break your untouchable data, and get rid of pointer mess
>
> and const functions. This is such a good thing, it allows the
> compiler to make great optimizations that are not possible in C. The
> C9x standards had (IIRC) a similar "restricted" keyword for C, but I
> don't know if gcc is going to implement it. You might want to demand
> that from gcc developers :)

Is this similar to the gcc 'const' attribute?

int foo (int, char *) __attribute__((__const__));

This is valid in GNU C (not just C++). Read the info page for
details. As to the pass-by-reference operator, that's just syntactic
sugar and IMHO the information-hiding makes more trouble than it's
worth (I want to *know* I'm passing by reference!).

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.205 / U:15.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site