https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
--- Comment #13 from Jakub Jelinek ---
Author: jakub
Date: Fri Mar 31 18:39:25 2017
New Revision: 246621
URL: https://gcc.gnu.org/viewcvs?rev=246621=gcc=rev
Log:
PR c++/79572
* c-ubsan.h (ubsan_maybe_instrument_reference):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
--- Comment #12 from Jakub Jelinek ---
Created attachment 41029
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41029=edit
gcc7-pr79572.patch
Untested fix.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
--- Comment #11 from Jakub Jelinek ---
Started with r230365, difference in *.original is:
- foo ((const int &) (UBSAN_NULL (0B, 2B, 4);, 0B)) >;
+ foo (0) >;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
Richard Biener changed:
What|Removed |Added
Priority|P3 |P2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
--- Comment #10 from janus at gcc dot gnu.org ---
(In reply to janus from comment #9)
> But at least clang 3.9 has some additional diagnostics:
>
> null_ref.cpp:11:5: warning: binding dereferenced null pointer to reference
> has undefined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
--- Comment #9 from janus at gcc dot gnu.org ---
(In reply to Richard Biener from comment #8)
> Btw, clang behaves the same:
True. But at least clang 3.9 has some additional diagnostics:
null_ref.cpp:11:5: warning: binding dereferenced null
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
--- Comment #8 from Richard Biener ---
Btw, clang behaves the same:
> clang++ t.C -O2
t.C:4:12: warning: reference cannot be bound to dereferenced null pointer in
well-defined C++ code; pointer may be assumed to always convert to true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
--- Comment #7 from janus at gcc dot gnu.org ---
(In reply to Markus Trippelsdorf from comment #2)
> You can use -fno-delete-null-pointer-checks as a workaround for this issue.
Thanks for the comment, that's very helpful.
> But the C++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
Marek Polacek changed:
What|Removed |Added
Status|NEW |ASSIGNED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79572
Markus Trippelsdorf changed:
What|Removed |Added
Status|RESOLVED|NEW
CC|
10 matches
Mail list logo