That is true, but read my statement. The kernel headers don't work
with g++. That is because they are not c++, they are c. Ansi
standard C++ lost its direct compatibility with c in several places
including operator precedence. g++ also parses statements somewhat
differently so that this
switch(x) {
case 'a': do_something(); break;
case 'b':
case 'c': do_something_else(); break;
case 'd':
}
...will compile in gcc but not g++ IIRC. Now strictly in ansi c the
above should not be allowed as a statement label (which "case 'd':"
is) has to attach to a statement (which there isn't one in this case).
This is why (regardless of libc), the kernel headers should not be
compiled by a c++ compiler.
Sean
-
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/