https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
--- Comment #9 from Martin Sebor ---
Author: msebor
Date: Tue Nov 12 17:18:37 2019
New Revision: 278098
URL: https://gcc.gnu.org/viewcvs?rev=278098&root=gcc&view=rev
Log:
PR middle-end/83688 - check if buffers may overlap when copying strings us
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
Martin Sebor changed:
What|Removed |Added
Keywords||patch
--- Comment #8 from Martin Sebor -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
--- Comment #7 from Daniel Fruzynski ---
In general case yes, this can produce a lot of false positives. I wanted to use
this only for strings stored in fixed-size buffer. Existing string-related
warnings already uses this information, and this r
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
--- Comment #6 from Martin Sebor ---
The warning does see that range (it's in the output of the -fdump-tree-vrp
option). The challenge with using ranges is to avoid false positives from
excessive bounds. For sizes, typically only the lower boun
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
--- Comment #5 from Daniel Fruzynski ---
> There is nothing to indicate that the first call to memcpy() in comment #0
> overlaps so -Wrestrict doesn't warn for it.
I thought that fix for bug 83373 will somehow help here. gcc could guess that
mem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
--- Comment #4 from Martin Sebor ---
There is nothing to indicate that the first call to memcpy() in comment #0
overlaps so -Wrestrict doesn't warn for it.
One thing to note is that the warning treats raw memory functions slightly
differently th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
--- Comment #3 from Daniel Fruzynski ---
Looks that something is not working properly. I have pasted output from
compilation of function in 1st post, and -Wrestrict complained only about last
memcpy call. Please take a look on this.
BTW, string
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688
Martin Sebor changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned at