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?

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: sizeof struct with flexible array: when did it change?
Date 2024-10-06 20:43 -0700
Organization A noiseless patient Spider
Message-ID <86y130zifb.fsf@linuxsc.com> (permalink)
References <20241006192337.76@kylheku.com>

Show all headers | 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