Re: "variable-size type declared" error for const sized array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bahadir,

Compiled as C++ (-std=c++98, using GCC 4.0.0), your code works with the
const int.

Compiled with -std=c89 or -std=c99, your code produces the error you
described.

I'm not so familiar with ISO/IEC 9899, so I'm not sure what the standard
says in this situation.

However, I'm willing to wager that GCC complies with the standard, and that
the error message is indicative of where the code is in violation of the
standard, and why.

HTH,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux