以下的C程序由于test_array的大小不是编译时常量而无法通过gcc编译。为什么?
struct HWND__ { int unused; };
typedef struct HWND__ *HWND;
void test()
{
static int test_array[ (unsigned long long)((HWND)1) ];
}
产生的错误是:
test.c: In function ‘test’:
test.c:5:14: error: storage size of ‘test_array’ isn’t constant
static int test_array[ (unsigned long long)((HWND)1) ];
^
static int test_array[1]
жҲ–иҖ…еҸӘз”Ёstatic int test_array
пјҹж„ҹи§үеғҸжҳҜ XY й—®йўҳгҖӮдҪ жғіиҰҒе®һзҺ°д»Җд№Ҳзӣ®зҡ„пјҹ - LPs-pedantic
时。 - ams