https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103121
Bug ID: 103121 Summary: Warnings Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: danglin at gcc dot gnu.org Target Milestone: --- Host: hppa*-*-linux* Target: hppa*-*-linux* Build: hppa*-*-linux* /home/dave/gnu/gcc/objdir/./prev-gcc/xg++ -B/home/dave/gnu/gcc/objdir/./prev-gcc/ -B/home/dave/opt/gnu/gcc/gcc-12/hppa-linux-gnu/bin/ -nostdinc++ -B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs -B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include/hppa-linux-gnu -I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include -I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++ -L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs -L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs -fno-PIE -c -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -fno-checking -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -DHAVE_CONFIG_H -I. -Icp -I../../gcc/gcc -I../../gcc/gcc/cp -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o cp/optimize.o -MT cp/optimize.o -MMD -MP -MF cp/.deps/optimize.TPo ../../gcc/gcc/cp/optimize.c /home/dave/gnu/gcc/objdir/./prev-gcc/xg++ -B/home/dave/gnu/gcc/objdir/./prev-gcc/ -B/home/dave/opt/gnu/gcc/gcc-12/hppa-linux-gnu/bin/ -nostdinc++ -B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs -B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include/hppa-linux-gnu -I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include -I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++ -L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs -L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs -fno-PIE -c -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -fno-checking -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -DHAVE_CONFIG_H -I. -Icp -I../../gcc/gcc -I../../gcc/gcc/cp -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o cp/parser.o -MT cp/parser.o -MMD -MP -MF cp/.deps/parser.TPo ../../gcc/gcc/cp/parser.c ../../gcc/gcc/cp/optimize.c: In function 'tree_node* cdtor_comdat_group(tree, tree)': ../../gcc/gcc/cp/optimize.c:208:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 208 | grp_name[idx] = '\0'; | ~~~~~~~~~~~~~~^~~~~~ In file included from ../../gcc/gcc/system.h:706, from ../../gcc/gcc/cp/optimize.c:22: ../../gcc/gcc/../include/libiberty.h:733:36: note: at offset 1 into destination object of size 1 allocated by '__builtin_alloca' 733 | # define alloca(x) __builtin_alloca(x) | ~~~~~~~~~~~~~~~~^~~ ../../gcc/gcc/../include/libiberty.h:365:40: note: in expansion of macro 'alloca' 365 | #define XALLOCAVEC(T, N) ((T *) alloca (sizeof (T) * (N))) | ^~~~~~ ../../gcc/gcc/cp/optimize.c:191:14: note: in expansion of macro 'XALLOCAVEC' 191 | grp_name = XALLOCAVEC (char, IDENTIFIER_LENGTH (complete_name) + 1); | ^~~~~~~~~~ ../../gcc/gcc/cp/parser.c: In function 'void cp_parser_decl_specifier_seq(cp_parser*, cp_parser_flags, cp_decl_specifier_seq*, int*)': ../../gcc/gcc/cp/parser.c:15847:55: warning: misspelled term 'decl' in format; use 'declaration' instead [-Wformat-diag] 15847 | "standard attributes in middle of decl-specifiers"); | ^~~~ ../../gcc/gcc/cp/parser.c:15849:57: warning: misspelled term 'decl' in format; use 'declaration' instead [-Wformat-diag] 15849 | "standard attributes must precede the decl-specifiers to " | ^~~~ cc1plus: all warnings being treated as errors make[3]: *** [Makefile:1138: cp/optimize.o] Error 1