Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: C language declaration "bugs" |
| Date | 2016-10-11 19:10 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87twciah95.fsf@bsb.me.uk> (permalink) |
| References | <90bf0ba6-5094-4551-8cc0-c60214b14362@googlegroups.com> <87d1j7avp8.fsf@bsb.me.uk> <b4976e0d-cedb-4721-a261-d3597eb43b97@googlegroups.com> <87zimb9e5b.fsf@bsb.me.uk> <ln60oyom5l.fsf@kst-u.example.com> |
Keith Thompson <kst-u@mib.org> writes: > Ben Bacarisse <ben.usenet@bsb.me.uk> writes: >> Thiago Adams <thiago.adams@gmail.com> writes: > [...] >>> I can't find any options to express dynamic arrays in structs. >> >> No, you can't, other than the "struct hack" of putting a flexible array >> member (i.e. an incomplete array declaration) as the last member. > > I think the term "struct hack" generally refers to the old technique of > defining an array member of length 0 or 1 at the end of a structure and > treating it as a longer array. Flexible array members, added in C99, > were intended to *replace* the struct hack. Yes, it does. I meant to imply that it had been sanctioned with the new syntax but I don't think that came out. -- Ben.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
C language declaration "bugs" Thiago Adams <thiago.adams@gmail.com> - 2016-10-11 05:17 -0700
Re: C language declaration "bugs" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-11 13:58 +0100
Re: C language declaration "bugs" Thiago Adams <thiago.adams@gmail.com> - 2016-10-11 06:47 -0700
Re: C language declaration "bugs" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-11 15:03 +0100
Re: C language declaration "bugs" Thiago Adams <thiago.adams@gmail.com> - 2016-10-11 07:41 -0700
Re: C language declaration "bugs" BartC <bc@freeuk.com> - 2016-10-11 16:31 +0100
Re: C language declaration "bugs" Keith Thompson <kst-u@mib.org> - 2016-10-11 10:01 -0700
Re: C language declaration "bugs" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-11 19:10 +0100
Re: C language declaration "bugs" BartC <bc@freeuk.com> - 2016-10-11 14:14 +0100
csiph-web