@fleuria, how do you mean? The problem is that Visual C++ thinks it is
variable length array and complains about it. Removing const would only
make it worse, no? :)

On Friday, November 15, 2013, fleuria wrote:

> In src/load.c:
>
> > @@ -498,15 +498,15 @@
> >  static int
> >  read_lineno_record_file(mrb_state *mrb, FILE *fp, mrb_irep *irep)
> >  {
> > -  const size_t record_header_size = 4;
> > -  uint8_t header[record_header_size];
> > +  #define RECORD_HEADER_SIZE 4
> > +  uint8_t header[RECORD_HEADER_SIZE];
>
> instead of #define and #undefine to limit a const variable in a local
> scope, I think it would be fine to just leave the const keyword aside,
> it's easy for compiler to optimize it away.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mruby/mruby/pull/1574/files#r7681565>
> .
>


-- 
mvh,
Per Lundberg