[PATCH] D133574: [C2x] reject type definitions in offsetof

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 14 00:31:53 PST 2023


mstorsjo added a comment.

+1 on this being disruptive. Also, not only GCC, but also MSVC seem to handle the existing constructs in the wild. I ran into this at https://github.com/FFmpeg/FFmpeg/blob/n5.1.2/libavutil/video_enc_params.c#L30-L34 (where it probably would be trivial to fix, but leaving current releases broken with newer clang) and at https://github.com/wine-mirror/wine/blob/wine-8.0-rc4/include/winnt.h#L399-L405 (where it works with clang in the usual gnuc mode, but falls back on the UB construct with clang in msvc mode).


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