牛人帮解决vc下编译出错C2057 C2466,谢谢

chengwei02 chengwei02 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
#define MC_PCC_FILL_STRUCT3 u8:0; u8:8; u8:8; u8:8; u8:0;
typedef struct __alg { char c; MC_PCC_FILL_STRUCT3 void * p; } __alg_t;
#define MC_PPC_DISTANCE_OF(S,F) (unsigned) (&(((S *) 0)->F))

#define ALIGNMENT (MC_PPC_DISTANCE_OF(__alg_t, p) - 1)
#define ALIGN(P) ( (u32) ((char *)(P) + ALIGNMENT) & ~ALIGNMENT)

u8 InterruptStack[ALIGN( INTERRUPT_STACK_SIZE )];
u8 stack_task0[ALIGN (STACK0_SIZE) ];

编译出错:
d:\tool\type.hiv(40) : error C2057: expected constant expression
d:\tool\type.hiv(40) : error C2466: cannot allocate an array of constant size 0
d:\tool\type.hiv(41) : error C2057: expected constant expression
d:\tool\type.hiv(41) : error C2466: cannot allocate an array of constant size 0
...全文
评论 3
收藏 已收藏
分享
返回顶部
chengwei02
VC/MFC 16,550 成员 421,606 内容