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
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.,
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
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
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic
CC|