https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470
Andrew Pinski changed:
What|Removed |Added
Target Milestone|--- |9.0
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470
--- Comment #4 from Martin Sebor ---
When p is null p->a is not valid if it's evaluated. offsetof (along with
sizeof and alignof and the like) don't evaluate their operands so they are
exempt.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470
Martin Sebor changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470
--- Comment #1 from Marc Glisse ---
I can't see the difference between the 2 cases?
clang gives for both:
warning: comparison of array 'p->a' equal to a null pointer is always false
[-Wtautological-pointer-compare]