Allocating with enum-const
Alexandre Oliva
oliva@dcc.unicamp.br
Wed Jan 14 08:20:00 GMT 1998
Letschert Thomas writes:
> A simple program crashes g++.
g++ should not crash, but your program is incorrect.
> store = new char[TableInt::ValSize][size];
This should read:
store = new char[size][TableInt::ValSize];
Only the first subscript may be non-constant, because the others
determine the type of the returned pointer.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list