Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以防万一,我想使用编译器标志在模块级别定义结构对齐,例如/Zp for cl 在 windows 上。GCC 和 clang 的替代方案是什么?
gcc -v --help给出:
gcc -v --help
-fpack-struct Pack structure members together without holes -fpack-struct=<number> Set initial maximum structure member alignment
clang 具有相同的开关(至少 clang 3.x)。