public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-286] doc: Add explanation of zero-length array example
@ 2023-04-27  8:56 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-04-27  8:56 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:429c72eb632040bacef9569b6d783d72fee93b42

commit r14-286-g429c72eb632040bacef9569b6d783d72fee93b42
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Apr 26 17:09:36 2023 +0100

    doc: Add explanation of zero-length array example
    
    gcc/ChangeLog:
    
            * doc/extend.texi (Zero Length): Describe example.

Diff:
---
 gcc/doc/extend.texi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index ac476801ed8..e426a2eb7d8 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -1705,6 +1705,9 @@ struct line *thisline = (struct line *)
 thisline->length = this_length;
 @end smallexample
 
+In this example, @code{thisline->contents} is an array of @code{char} that
+can hold up to @code{thisline->length} bytes.
+
 Although the size of a zero-length array is zero, an array member of
 this kind may increase the size of the enclosing type as a result of tail
 padding.  The offset of a zero-length array member from the beginning

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-27  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-27  8:56 [gcc r14-286] doc: Add explanation of zero-length array example Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).