You are not logged in.
Pages: 1
C++ must has constexpr as length of array, right?
What's the reason that GCC (with c++ command) compiled my .cpp file includes array with variable length?
I saw some topic about C99, is it related?
Last edited by Baird (2023-04-15 14:21:40)
Offline
By default both g++ and gcc enable GNU extensions, including variable length arrays. To enforce standard behavior, -pedantic-errors must be passed among the options. Best used with the specific -std= option to avoid confusion.
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
Pages: 1