I recently found a interesting behaviour of g++ when compared with MSVC++ 2008. Consider this tiny program:
#include
const int ARR_LENGTH =
Dynamically sized arrays are a feature of C99. If your compiler supports C99 (GCC does, VC doesn't fully) - and if you throw the C99 switch -, then this will compile.
C99 (the most recent version of the C standard) does allow dynamically sized arrays. However, the feature is not supported by Visual Studio (which only implements C89 support)
In C++ it is not, and probably will never be, valid.
This is not standard C++ (but standard C). Implementations may provide alloca (or _alloca with msvc) which pretty much does the job.