[Bug middle-end/85369] New: no -Wstringop-overflow for a strcpy / stpcpy call with a nonstring pointer when providing movstr pattern

krebbel at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 12 07:48:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85369

            Bug ID: 85369
           Summary: no -Wstringop-overflow for a strcpy / stpcpy call with
                    a nonstring pointer when providing movstr pattern
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: krebbel at gcc dot gnu.org
  Target Milestone: ---

c-c++-common/attr-nonstring-3.c fails on IBM Z. A warning only appears when the
strcpy/stpcpy are expanded as normal calls. If the back-end provides the movstr
expander no warning will appear (if the expander can be used).

Just issuing a warning in the builtin expansion logic might end up emitting two
warnings: see PR85359


More information about the Gcc-bugs mailing list