[PATCH] D133574: [C2x] reject type definitions in offsetof
Yingchi Long via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 13 22:51:35 PST 2022
inclyc added a comment.
Hi @aaron.ballman seems we are failing on recent change 2fc5a3410087c209567c7e4a2c457b6896c127a3 <https://reviews.llvm.org/rG2fc5a3410087c209567c7e4a2c457b6896c127a3>
/* The DR asked a question about whether defining a new type within offsetof
* is allowed. C2x N2350 made this explicitly undefined behavior, but Clang
* has always supported defining a type in this location, and GCC also
* supports it.
*/
(void)__builtin_offsetof(struct S { int a; }, a);
Do you think this patch should still be merged into mainline? Or do we turn this error into a warning?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133574/new/
https://reviews.llvm.org/D133574
More information about the cfe-commits
mailing list