Why do gcc support empty struct extension for?

me22 me22.ca@gmail.com
Thu Oct 16 14:12:00 GMT 2008


On Wed, Oct 15, 2008 at 22:02, tiande <tiande@gmail.com> 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.)



More information about the Gcc-help mailing list