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]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]