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:

| On 05/17/2006 13:18, Gabriel Dos Reis wrote:
| > The current behaviour is standard mandated.  I fail to see why it is
| > error prone and a kind of lie.  If you ask me, it is quite the otehr
| > semantics that is error prone.  The current g++ behaviour has been C++
| > semantics since the dark ages.  GNU C decided to deviate from it.
| 
| BTW
| 
| extern "C++" struct S { char q[0]; };
| 
| This structure has zero size, can be a member of another structure, can
| be inherited, etc. Is it standard behavior? Just asking.

It is invalid ISO C++ construct.

zero sized arrays has traditionaly raised the temperature on this list.

-- Gaby


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