NO

Author Topic: Does not compile in v 10.00.6  (Read 3890 times)

Offline anper20

  • Member
  • *
  • Posts: 1
Does not compile in v 10.00.6
« 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 :)

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Does not compile in v 10.00.6
« Reply #1 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

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Does not compile in v 10.00.6
« Reply #2 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...
/Pelle