https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
Jose E. Marchesi changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
--- Comment #6 from CVS Commits ---
The master branch has been updated by Cupertino Miranda :
https://gcc.gnu.org/g:e0a81559c198153923f0a1a3be7c25df545f3964
commit r14-2962-ge0a81559c198153923f0a1a3be7c25df545f3964
Author: Cupertino Miranda
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
Jose E. Marchesi changed:
What|Removed |Added
Status|NEW |ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
--- Comment #5 from David Faust ---
(In reply to Andrew Pinski from comment #4)
> (In reply to David Faust from comment #3)
> > Thanks for the info Andrew. I'll look at __builtin_offsetof.
> >
> > As for the implementation in clang, I can
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Ever confirmed|0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
--- Comment #3 from David Faust ---
Thanks for the info Andrew. I'll look at __builtin_offsetof.
As for the implementation in clang, I can point to some bits relevant to
the builtin itself:
llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
--- Comment #2 from Andrew Pinski ---
The reason why is folded is because some folks use the null pointer for
offsetof (previously before GCC added __builtin_offsetof).
I wonder if you could use __builtin_offsetof here.
I also curious how this
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
--- Comment #1 from David Faust ---
Looks like this is a result of the combination of how the bpf_core_field_exists
macro is defined and some sort of optimization(?) happening in the C frontend.
Consider:
struct S {
unsigned short x;