This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
But not in GNU C:Linux kernel, all written in C, has many empty structures. They prevent from introducing safe C++ code.
GCC permits a C structure to have no members:
struct empty { };
The structure will have size zero. In C++, empty structures are part of the language. G++ treats empty structures as if they had a single member of type `char'.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |