GCC 3.0 considered harmful (kernel Click)
Eddie Kohler
kohler at icir.org
Thu Nov 21 09:36:47 EST 2002
All,
DO NOT use Linux-kernel Click with GCC 3.0 or later. (The default GCC
shipped with Red Hat 8 is 3.2.) An incompatibility between the C and C++
compilers will cause havoc.
The particular problem is this:
struct empty { };
printf("%d\n", sizeof(struct empty));
prints 0 under C, and 1 under C++. This causes Click to get kernel
structure layouts wrong, particularly if SMP is not defined.
The GCC compiler people know about this issue:
http://gcc.gnu.org/ml/gcc/2002-09/msg01109.html
>:(
Eddie
More information about the click
mailing list