This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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);




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]