Skip to content
Advertisement

Disable variable-length automatic arrays in gcc

I couldn’t disable it even though by using -std=c89 flag. How can I disable it?

Advertisement

Answer

You can generate an error for variable length arrays using a compiler flag:

-Werror=vla
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement