]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gcc/extensions-to-the-c-language-family/structures-with-no-members.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gcc / extensions-to-the-c-language-family / structures-with-no-members.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. index:: empty structures, zero-size structures
7
8 .. _empty-structures:
9
10 Structures with No Members
11 **************************
12
13 GCC permits a C structure to have no members:
14
15 .. code-block:: c++
16
17 struct empty {
18 };
19
20 The structure has size zero. In C++, empty structures are part
21 of the language. G++ treats empty structures as if they had a single
22 member of type ``char``.