Re: zero length array example does not compile

2023-04-26 Thread Jonny Grant
On 26/04/2023 00:04, Jonathan Wakely wrote: > On Tue, 25 Apr 2023 at 20:21, Jonny Grant wrote: >> >> >> >> On 25/04/2023 13:22, Jonathan Wakely wrote: >>> On Tue, 25 Apr 2023 at 13:17, Jonathan Wakely wrote: On Tue, 25 Apr 2023 at 13:13, Jonny Grant wrote: > > Hello >

Re: zero length array example does not compile

2023-04-25 Thread Jonathan Wakely via Gcc
On Tue, 25 Apr 2023 at 20:21, Jonny Grant wrote: > > > > On 25/04/2023 13:22, Jonathan Wakely wrote: > > On Tue, 25 Apr 2023 at 13:17, Jonathan Wakely wrote: > >> > >> On Tue, 25 Apr 2023 at 13:13, Jonny Grant wrote: > >>> > >>> Hello > >>> > >>> https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

Re: zero length array example does not compile

2023-04-25 Thread Jonny Grant
On 25/04/2023 13:22, Jonathan Wakely wrote: > On Tue, 25 Apr 2023 at 13:17, Jonathan Wakely wrote: >> >> On Tue, 25 Apr 2023 at 13:13, Jonny Grant wrote: >>> >>> Hello >>> >>> https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html >>> >>> I wondered 'this_length' refers to in that example, it doesn

Re: zero length array example does not compile

2023-04-25 Thread Jonathan Wakely via Gcc
On Tue, 25 Apr 2023 at 13:17, Jonathan Wakely wrote: > > On Tue, 25 Apr 2023 at 13:13, Jonny Grant wrote: > > > > Hello > > > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > > > I wondered 'this_length' refers to in that example, it doesn't compile. > > It's not supposed to be a complete

Re: zero length array example does not compile

2023-04-25 Thread Jonathan Wakely via Gcc
On Tue, 25 Apr 2023 at 13:13, Jonny Grant wrote: > > Hello > > https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > I wondered 'this_length' refers to in that example, it doesn't compile. It's not supposed to be a complete program. > > : In function 'main': > :13:34: error: 'this_length' undec

zero length array example does not compile

2023-04-25 Thread Jonny Grant
Hello https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html I wondered 'this_length' refers to in that example, it doesn't compile. : In function 'main': :13:34: error: 'this_length' undeclared (first use in this function) 13 | malloc (sizeof (struct line) + this_length); |