[C++ PATCH] warning about empty extern "C" structures

Christoph Hellwig hch@infradead.org
Thu May 18 18:15:00 GMT 2006


On Wed, May 17, 2006 at 02:17:36PM -0400, Andrew Pinski wrote:
> No I am saying extern "C" does not change the layout of the struct from the C++ layout.
> 
> Again this is not something I want warning about and I hope the kernel people remove
> invalid C (though valid GNU C) from their sources if they care anything about portablity.

In case you refer to the Linux kernel here we'll definitly not turn this
warning on.  The Linux kernel is written in GNU C and there's no interest
in supporting people writing module in C++.  The empty structures feature
is used intentionally and extensively all over the Linux kernel.



More information about the Gcc-patches mailing list