>I'm trying to build a kernel module in C++. This code includes some of
>the linux kernel header files, and unfortunately does not compile with
>recent versions of the kernel. The code is not my own - I have
>inherited it from someone else - but I am assured that it used to
>compile.
>
>The error I get has to do with include/linux/signal.h under the kernel
>source tree: the functions siginitset and siginitsetinv both contain
>switch statements which are invalid C++ syntax (and in fact, are
>invalid in C, but which make use of a gcc extension). Specifically,
>the last label ("case 1:") in these statements should be followed by a
>semicolon.
[...]
>Thanks,
>
>Ronnie Misra rgmisra@mit.edu
I'm replying again to the original post, because I want to avoid the
predictable holy war that has erupted.
Mr. Misra's difficulty had nothing to do with C/C++ wars. It came from the
headers' reliance on a [bug,quirk,feature,extension] of gcc.
Even if the kernel itself is forever joined at the hip to gcc-2.7.2, it
would be only civilized to arrange for the headers to be legal ANSI. Many of
them are, but certainly not all.
Who will be maintaining gcc-2.7.2 after 2.9.5 is released?
Will kernel developers reject the new C standard?
If the answers include "nobody" or "yes", then there's trouble ahead.
Regards,
Tom
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/