https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116216
Bug ID: 116216 Summary: -Wstringop-overread in attribs.cc Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Created attachment 58815 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58815&action=edit attribs.ii.xz ``` $ gcc -c attribs.ii -O3 -Werror=stringop-overread In function ‘void selftest::test_attribute_exclusions()’, inlined from ‘void selftest::attribs_cc_tests()’ at /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/attribs.cc:2757:29: /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/attribs.cc:2732:27: error: ‘int strcmp(const char*, const char*)’ reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread] 2732 | if (!strcmp (attr_name, excl_name)) | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ In function ‘void selftest::attribs_cc_tests()’: cc1plus: note: source object is likely at address zero cc1plus: some warnings being treated as errors ```