You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clang does not accept type definitions inside of the type provided to offsetof. However, I don't see any wording which forbids this. Here is an example program (Clang 16 and newer don't seem to accept this):
There was a proposal (N2350) which added some text to make this UB, but that has been changed since by DE-137 (N3148) which removes this restriction and only makes it UB if there is an unparenthesized comma inside of offsetof. N3167 includes discussion about accepting DE-137.