From: Richard Biener <richard.guenther@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] doc: Add explanation of zero-length array example
Date: Thu, 27 Apr 2023 09:24:43 +0200 [thread overview]
Message-ID: <CAFiYyc1iPQzvRXNwi+ZSyHq31pMS1kR3o6jvhkuYx5mAGtY7rQ@mail.gmail.com> (raw)
In-Reply-To: <20230426161539.1571701-1-jwakely@redhat.com>
On Wed, Apr 26, 2023 at 6:16 PM Jonathan Wakely via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> As suggested here:
> https://gcc.gnu.org/pipermail/gcc/2023-April/241190.html
>
> OK for trunk?
OK
> -- >8 --
>
> gcc/ChangeLog:
>
> * doc/extend.texi (Zero Length): Describe example.
> ---
> gcc/doc/extend.texi | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
> index 84b44cb9916..06134a50ad2 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
> --
> 2.40.0
>
prev parent reply other threads:[~2023-04-27 7:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 16:15 Jonathan Wakely
2023-04-27 7:24 ` Richard Biener [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFiYyc1iPQzvRXNwi+ZSyHq31pMS1kR3o6jvhkuYx5mAGtY7rQ@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).