https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96188
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2020-07-13 00:00:00 |2021-1-21
Known to fail| |10.2.0, 11.0
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
No change in GCC 11 (except for the size in the note):
$ gcc -O3 -S -Wall -std=gnu++11 pr96188.C
pr96188.C: In function ‘void F()’:
pr96188.C:9:18: warning: unused variable ‘fx’ [-Wunused-variable]
9 | for (const int fx : {0}) {
| ^~
cc1plus: warning: writing 16 bytes into a region of size 0
[-Wstringop-overflow=]
In file included from
/build/gcc-master/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
from
/build/gcc-master/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/allocator.h:46,
from
/build/gcc-master/x86_64-pc-linux-gnu/libstdc++-v3/include/string:41,
from pr96188.C:2:
/build/gcc-master/x86_64-pc-linux-gnu/libstdc++-v3/include/ext/new_allocator.h:121:48:
note: at offset 112 into destination object of size 96 allocated by ‘operator
new’
121 | return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~