3 ms·
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 det
by fafner 14y ago
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.