https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70019
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Known to fail| |4.9.3 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Similarly, the requirement to throw an exception when "the object is initialized with a string literal and there are more initializers than there are array elements" is not implemented (although the requirement to throw when "the initializer of the object is a braced-init-list whose number of (top-level) initializer-clauses exceeds the number of elements to initialize" is.) $ cat z.cpp && /home/msebor/build/gcc-4.9.3/gcc/xg++ -B/home/msebor/build/gcc-4.9.3/gcc -L /home/msebor/build/gcc-4.9.3/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -Wall -Wextra -Wpedantic -std=c++1y -xc++ z.cpp && ./a.out typedef __SIZE_TYPE__ size_t; int main () { size_t n = 3; try { char a [n] = "abcd"; __builtin_abort (); } catch (...) { } } z.cpp: In function ‘int main()’: z.cpp:7:18: warning: taking address of array of runtime bound [-Wvla] char a [n] = "abcd"; ^ z.cpp:7:10: warning: unused variable ‘a’ [-Wunused-variable] char a [n] = "abcd"; ^ Aborted (core dumped)