[PATCH] D142723: [C2x] Stop diagnosing member and array access in offsetof as an extension
Alexey Neyman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 27 10:00:54 PST 2023
stilor added inline comments.
================
Comment at: clang/docs/LanguageExtensions.rst:2389
const int ext1 = __builtin_offsetof(struct U { int i; }, i); // C extension
- const int ext2 = __builtin_offsetof(struct S, t.f[1]); // C & C++ extension
+ const int ext2 = __builtin_offsetof(struct S, t.f[1]);
----------------
Minor nit: maybe rename from `ext2` to, say, `offset_to_subobject` to avoid implying it is an extension.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142723/new/
https://reviews.llvm.org/D142723
More information about the cfe-commits
mailing list