Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #388584

Re: sizeof struct with flexible array: when did it change?

Path csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: sizeof struct with flexible array: when did it change?
Date Sun, 06 Oct 2024 20:43:52 -0700
Organization A noiseless patient Spider
Lines 13
Message-ID <86y130zifb.fsf@linuxsc.com> (permalink)
References <20241006192337.76@kylheku.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Date Mon, 07 Oct 2024 05:43:53 +0200 (CEST)
Injection-Info dont-email.me; posting-host="a62c12983f398f111226e581353fb46e"; logging-data="1673085"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rcmU5RTiPLlzjrhUHgzOjS+gb+9spPz4="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:0oUK1Ab2PF+H9hH+w5w+IlBhY/Q= sha1:mPkGAKiPS+yT0X63yXwvBqk6JHU=
Xref csiph.com comp.lang.c:388584

Show key headers only | View raw


Kaz Kylheku <643-408-1753@kylheku.com> writes:

> C99 said that the size of a structure that ends in a flexible array
> member is the same as the offset of that flexible member in a
> similar structure in which the array has some unspecified size.
>
> The latest draft says that the size is calculated as if the flexible
> array member were omitted, except that there may be more padding than
> the omission would imply.

The change was made in a TC to C99, sometime in the early
2000s.  (No I don't know which TC specifically, but the
wording change can be seen in N1256.)

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

sizeof struct with flexible array: when did it change? Kaz Kylheku <643-408-1753@kylheku.com> - 2024-10-07 02:32 +0000
  Re: sizeof struct with flexible array: when did it change? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-10-06 20:43 -0700
  Re: sizeof struct with flexible array: when did it change? Nick Bowler <nbowler@draconx.ca> - 2024-10-07 18:32 +0000
    Re: sizeof struct with flexible array: when did it change? Kaz Kylheku <643-408-1753@kylheku.com> - 2024-10-07 23:42 +0000
      Re: sizeof struct with flexible array: when did it change? Jeremy Brubaker <jbrubake.362@orionarts.invalid> - 2024-10-09 12:55 +0000
        Re: sizeof struct with flexible array: when did it change? scott@slp53.sl.home (Scott Lurndal) - 2024-10-09 15:06 +0000
    Re: sizeof struct with flexible array: when did it change? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-10-13 21:55 -0700

csiph-web