[Bug tree-optimization/94335] False positive -Wstringop-overflow warning with -O2

2020-05-20 Thread kal.conley at dectris dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335 kal.conley at dectris dot com changed: What|Removed |Added CC||kal.conley at dectris dot

[Bug tree-optimization/94335] False positive -Wstringop-overflow warning with -O2

2020-03-26 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335 --- Comment #5 from Martin Sebor --- Few middle-end warnings consider control flow -- most simply look at a single statement at a time and consider ranges of argument values (if any). Those that do consider control flow (e.g.,

[Bug tree-optimization/94335] False positive -Wstringop-overflow warning with -O2

2020-03-26 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335 --- Comment #4 from Romain Geissler --- Thanks Richard. Indeed, beyond the false positive described in this bug, our whole code that implement "relative pointer" is I think quite hacky and not very compiler friendly (around alignment, aliasing

[Bug tree-optimization/94335] False positive -Wstringop-overflow warning with -O2

2020-03-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org Ever

[Bug tree-optimization/94335] False positive -Wstringop-overflow warning with -O2

2020-03-26 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335 --- Comment #3 from Richard Biener --- You should be using (intptr_t)t - (intptr_t)this when computing the relative pointer, not sure if that makes a difference but pointer difference between pointers to different objects invokes undefined

[Bug tree-optimization/94335] False positive -Wstringop-overflow warning with -O2

2020-03-25 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335 --- Comment #2 from Romain Geissler --- Thanks for the explanation. However few observations: - Is it really expected that the wording of the warning seems to imply gcc knows for sure that there is an invalid access ? What is the warning meant

[Bug tree-optimization/94335] False positive -Wstringop-overflow warning with -O2

2020-03-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335 Martin Sebor changed: What|Removed |Added Keywords||diagnostic CC|