This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] warning about empty extern "C" structures
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Roman Kononov <kononov195-far at yahoo dot com>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: 20 Jun 2006 17:31:00 +0200
- Subject: Re: [C++ PATCH] warning about empty extern "C" structures
- References: <e4fce1$nrb$1@sea.gmane.org> <200605171508.k4HF8niT008668@greed.delorie.com> <446B4279.8010200@yahoo.com> <m3lkt039wi.fsf@uniton.integrable-solutions.net> <20060517162603.GA7859@nevyn.them.org> <m3sln81u6q.fsf@uniton.integrable-solutions.net> <20060517173419.GA9583@nevyn.them.org> <m3zmhgzfl4.fsf@uniton.integrable-solutions.net> <20060517184335.GA11683@nevyn.them.org> <446B70E9.2010505@codesourcery.com> <446B9B47.3060101@yahoo.com> <446B9E1A.9000504@codesourcery.com> <446BDCDB.4010405@yahoo.com> <C36CC8EC-3792-44C1-908E-4D3B0A7FDF7C@physics.uc.edu> <446BE3F2.50406@yahoo.com> <8D8F830E-9D51-4977-8FE2-A9AD649F2713@physics.uc.edu> <446BE9CD.3070806@yahoo.com> <m3k67bubfk.fsf@uniton.integrable-solutions.net> <4497FF51.90905@yahoo.com>
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