On Mon, 15 Oct 2018, Richard Sandiford wrote: > The patches therefore add a new "__sizeless_struct" keyword to denote > structures that are sizeless rather than sized. Unlike normal > structures, these structures can have members of sizeless type in > addition to members of sized type. On the other hand, they have all > the same limitations as other sizeless types (described in earlier > sections).
I don't see anything here disallowing offsetof on such structures. > Edits to the C standard > ======================= > > This section specifies the behaviour for sizeless types as an edit to N1570. That's a very old standard version. I'm not in Pittsburgh this week, but I don't see anything to do with these ideas on the agenda. I haven't seen any contributions from Arm to the ongoing discussions on the WG14 reflector that include issues relating to possibly runtime sized types (vectors, bignums, types representing information about another type, for example), unless they're using not-obviously-Arm email addresses. Is Arm going to be engaging in those discussions and working with people interested in these areas to produce proposals that take account of the different ideas people have for use of non-VLA types that may not have a compile-time-constant size (some of which may not end up in the C standard, of course)? (It might of course require multiple papers, e.g. starting with fixed-width vector types which as a widely-implemented feature are something it might be natural to consider for C2x.) -- Joseph S. Myers jos...@codesourcery.com