This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
multidimensional variable sized array C++
- From: Martin Vogt <vogt at itwm dot fraunhofer dot de>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Sep 2004 09:57:03 +0200
- Subject: multidimensional variable sized array C++
Hello,
I dont know if this code is supposed to compile, but gcc 3.3.1 and gcc
3.3.3 on SuSE 9.0 and
SuSE 9.0 stops with an internal compiler error:
class setS {
public:
setS( short Ni, short Nj, short Nk ) {
unsigned char S[Ni][Nj][Nk];
for( short i=0; i<Ni; ++i )
for( short j=0; j<Nj; ++j )
for( short k=0; k<Nk; ++k )
S[i][j][k] = '1';
return;
};
protected:
private:
};
int main()
{
short I=32;
short J=32;
short K=32;
setS( I, J, K );
return(0);