Re:C++14
by fafner on Friday November 02, 2012 @11:25AM
(#4733047)
Runtime size arrays (VLAs) are already supported as an extension in GCC. But I'm actually an opponent of VLAs in the current form. There simply is no way to detect the stack size and prevent an overflow. Worst of all AFAIR GCC does not add any checks either and simply changes the stack pointer. There simply is no reasonable way to recover from an overflow.
If they really want to include VLAs then they have to take care of those issues. And in C++ we have std::vector as a safer alternative to raw handling of variable length data.
If they really want to include VLAs then they have to take care of those issues. And in C++ we have std::vector as a safer alternative to raw handling of variable length data.