This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/77672] wrong rich location in warning: writing a terminating nul past the end
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Sep 2016 14:49:08 +0000
- Subject: [Bug preprocessor/77672] wrong rich location in warning: writing a terminating nul past the end
- Auto-submitted: auto-generated
- References: <bug-77672-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77672
--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
BTW, if you do have a need to send a "print the whole string" request via class
substring_loc, that could be handled by passing in INT_MAX as the idx values,
which will lead to a failure. (we could make it handle -1 similarly, but
input.c:get_source_location_for_substring currently only checks the upper
bound; it doesn't yet check > 0, but that would be trivial).