Messages in this thread |  | | Subject | Re: Linux kernel modules development in C++ | Date | Fri, 29 Sep 2000 11:10:12 -0400 | From | Horst von Brand <> |
| |
Marty Fouts <marty@dotcast.com> said:
[...]
> This list provides, I believe, an example of a class of programmers who have > little interest in the standard definition of the language, since, I'm told, > the Linux kernel isn't written in a standard programming language, but, > rather, in a dialect which is a subset of Gnu C. Thus, to be a linux kernel > hacker, it seems, one would be more interested in knowing what that dialect > is than in knowing what the standard is.
There are a bunch of advantages to using GCC's C in kernel: asm() is one rather large one. Some other extensions that are used extensively are inline functions, and the ability to manipulate sections in C. Other, less used ones, are varargs macros and local variables in expressions. gcc provides these extensions because it has been mostly developed for use on embedded devices, trying to write something as hardware-oriented as a OS kernel in standard C is out of the question; gcc is good enough and available for anything you'd want to build Linux on, so portability to other compilers isn't any priority.
OTOH, the standard is important anyway, you'd better know where the compier is going (since it does follow the language standard), and to try to write standard code where that makes sense. -- Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513 - 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/
|  |