Pelles C forum

Pelles C => General discussions => Topic started by: anper20 on July 24, 2020, 03:52:16 pm

Title: Does not compile in v 10.00.6
Post by: anper20 on July 24, 2020, 03:52:16 pm
Hi,

Just downloaded the new final version 10. Great job as usual. For me, still the best environment to develop C for Win32.
I noticed that an expression like

int * sizebytes
....
char mbBuffer[*sizebytes*2];

does not compile anymore, giving :

error #2067: Invalid use of '*'.

It was compiling fine in V 9.

Which is right ?

Thx :)
Title: Re: Does not compile in v 10.00.6
Post by: John Z on July 25, 2020, 12:31:37 pm
Hi,

It does seem to be a problem.  Two ways to work around it.
1) char mbBuffer[(*sizebytes * 2)];
or
2) int k = *sizebytes * 2;
    char mbBuffer[k];

Hope this helps until resolved,

John Z
Title: Re: Does not compile in v 10.00.6
Post by: Pelle on July 25, 2020, 12:55:15 pm
It's a bug, but with low priority. Easy to work around, and the VLA feature has a sketchy future. May be fixed in some future version...