抱歉有一个愚蠢的问题,但如果我需要确保结构/类/联合的对齐,我应该将属性((aligned(align))添加到typedef声明吗?
class myAlignedStruct{} __attribute__ ((aligned(16)));
typedef myAlignedStruct myAlignedStruct2; // Will myAlignedStruct2 be aligned by 16 bytes or not?
Run Code Online (Sandbox Code Playgroud)