[PATCH] D133574: [C2x] reject type definitions in offsetof
Benjamin Kramer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 13 08:11:35 PST 2023
bkramer added a comment.
GitHub finds around 1.9k instances of this pattern to compute `alignof`. There's a lot of duplicates and `#ifdefs` so the real number is going to be smaller, but it seems to be quite common. The annoying part is that there is no `_Alignof` in C99 so for many of those projects there is no easy fix.
Can this be demoted to a warning?
https://github.com/search?type=code&q=%2Foffsetof%5Cs*%5C%28%5Cs*struct%5Cs*%5C%7B%2F+lang%3Ac
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