Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compare type sizes in druntime with ImportC (#16571)
Types for bindings of C libraries in druntime need to match the C headers. Small differences can result in hard to debug problems. This test tries to automatically find types with a wrong size. This is done by also getting type sizes from C headers using ImportC and comparing them. Differences between the sizes can have different reasons: * Bugs in ImportC (e.g. for bitfields) can result in a wrong size * Type definitions in druntime can be wrong * Different preprocessor options could be used, like _FILE_OFFSET_BITS * Size differences can be fine, because some structs contain a member for the size or a version Members of structs and unions with the same name are also compared. For types with potential problems a comparison of the layout is printed. The test contains a list of known problems, which are only treated as warnings and not errors.
- Loading branch information