https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105460
Bug ID: 105460 Summary: sizeof (unsigned int) != sizeof (uint8_t *) Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhonghao at pku dot org.cn Target Milestone: --- Clang's comments say there is an `unsigned int`-sized "reserved" member here, because when the objc4 modern runtime is used on LP64 platforms, there would otherwise be a 32-bit-sized hole here for alignment reasons. However, it doesn't actually add the "reserved" field to its AST data structures. GCC *does* add the field explicitly. On LP64, adding it or not is irrelevant. But on AVR, sizeof (unsigned int) == sizeof (uint8_t *), and it matters. An example is from:https://github.com/mhjacobson/avr-objc/commit/6187e336d706f1a87a7f0cbd9efa838f9d966737 This means that I have to compile Objective-C code either all with clang or all with GCC.