On Mon, Jun 10, 2002 at 01:16:13PM +0300, Shachar Shemesh wrote:

> Gilad Ben-Yossef wrote:
> 
> >#endif // __KERNEL__
> >
> Using C++ style comments in kernel code? That tends to greatly limit the 
> compilers you can use to compile your code (assuming you are not writing 
> C++ kernel modules, that is).

The kernel can only be compiled with ONE compiler, gcc, due to
extensive use of gcc'isms[1]. C++ style comments, which personally I
find ugly in C code, are allowed in C code according to C99. They've
also been allowed by gcc since, well, forever.  

As for implying that we might write kernel modules in C++, sir, such a
comment would cause me (as a Qlusters kernel hacker) to demand
satisfaction at dawn, sir. I'll settle for a beer after the revolution
OS event, though ;)

BTW, while we're being pedantic, recent gcc versions no longer accpet
this code

#ifdef identifier
... 
#endif identifier

which used to be common in the kernel. The correct form is 
... 
#endif /* identifier */ 

[1] There was something on slashdot a month or two ago about a
different compiler that could compile the kernel, but my neurons are
no longer what they used to be. 
-- 
Highday 19 Forelithe 7466

http://vipe.technion.ac.il/~mulix/
http://syscalltrack.sf.net/

Attachment: msg19924/pgp00000.pgp
Description: PGP signature

Reply via email to