[C++ PATCH] warning about empty extern "C" structures
Gabriel Dos Reis
gdr@integrable-solutions.net
Tue Jun 20 15:03:00 GMT 2006
Roman Kononov <kononov195-far@yahoo.com> writes:
[...]
| > | | It is not bogus. Instead of just
| > | | struct empty_t {};
| > | | think about this:
| > | | struct empty_t {
| > | #ifdef MSG_DEBUG
| > | int debug;
| > | #endif
| > | #ifdef MAGIC
| > | long magic;
| > | #endif
| > | /*and so on for few pages*/
| > | };
| > the point is?
|
| The point was that empty structs may come handy for a different
| reason, which make the above code real.
All I see is an ODR violation.
-- Gaby
More information about the Gcc-patches
mailing list