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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2016-09-22
           Assignee|unassigned at gcc dot gnu.org      |dmalcolm at gcc dot 
gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
To clarify: you want a substring_loc that uses the terminating nul character to
use the location of the closing quote for the caret location, like this:

v.c: In function ā€˜gā€™:
v.c:10:15: warning: writing a terminating nul past the end of the destination
[-Wformat-length=]
   sprintf (d, "%-s", "abc");
                   ^

I believe that can be done by tweaking cpp_interpret_string_1; am working on a
fix.

Reply via email to