Re: Why do gcc support empty struct extension for?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for the clarification.
So what you mean that with {}, we explicitly tell the compiler that
the struct contains no content but without the {}, we tell the
compiler that we don't know the internal of the struct but some
private module do know.

--TT

On Thu, Oct 16, 2008 at 10:11 PM, me22 <me22.ca@xxxxxxxxx> wrote:
> On Wed, Oct 15, 2008 at 22:02, tiande <tiande@xxxxxxxxx> wrote:
>>
>> struct foo{};
>>
>> or just
>>
>> struct bar;
>>
>> Any example of the usage?
>>
>
> Note than those 2 things are completely different.  The former is
> useless in C; the latter is not.  (The former is quite common in C++
> for tags, especially in the context of template metaprogramming.)
>



-- 
Regards,
   Chong, Tian Teck
   tiande@xxxxxxxxx

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux