Why array of length zero.

Why GCC allow to create an array of length 0 as c++ does not allow to make a an array of length zero.
int ptr[0] ;
Has it any benefit ?
You can read about it here http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

If you pass the -pedantic flag to gcc you will get a warning.

Last edited on
bro i m a beginner and dont know ISO C99 and C90 plz tell me in simple c++.
Topic archived. No new replies allowed.