牛人帮解决vc下编译出错C2057 C2466,谢谢
#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