Why do gcc support empty struct extension for?

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

 



In C++ context, I understand that it might be used as base class.
But I don't understand, what does it for in C context? What is the
reason we used empty struct in C.

(This is the first time I post in this mailing list and I have search
through comp.lang.c, gcc mailing list, google to make sure that this
is not a repeated post)

e.g.

struct foo{};

or just

struct bar;

Any example of the usage?

--
Regards,
  Chong, Tian Teck
  tiande@xxxxxxxxx




--
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