Make types with sizes that aren't a power of two an error (that can be disabled) in structs with ms_struct layout, except on mingw where the situation is quite likely to occur and GCC handles it silently.
Details
Details
- Reviewers
efriedma compnerd - Commits
- rG06815bf8ab3a: Merging r326476:
rG87c2ad29ee4e: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC
rL333571: Merging r326476:
rC326476: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC
rL326476: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Added an error-by-default diagnostic (just like the existing warn_cxx_ms_struct) for this case, trigger it on all targets other than mingw (where the situation is quite likely to occur, and GCC handles it silently).
@compnerd, do you like this better?