0

我知道与上述问题有很多类似的问题,但是在向声明的全局变量附近的简单代码库添加 GNU 复杂扩展时遇到错误。

    /*
    * This is a RANDOMLY GENERATED PROGRAM.
    *
    * Generator: csmith 2.4.0
    * Git version: e32985a
    * Options:   --max-funcs 1 --complex
 * Seed:      1803163907
 */

#include "csmith.h"

static long __undefined;

/* --- Struct/Union Declarations --- */
#pragma pack(push)
#pragma pack(1)
struct S0 {
   const signed f0 : 23;
   unsigned f1 : 1;
   const signed f2 : 24;
   unsigned f3 : 15;
   unsigned f4 : 14;
};
#pragma pack(pop)

/* --- GLOBAL VARIABLES --- */
static _Complex volatile int32_t g_11 = 1L;/* VOLATILE GLOBAL g_11 */

/* --- FORWARD DECLARATIONS --- */
static uint32_t  func_1(void);


/* --- FUNCTIONS --- */
/* ------------------------------------------ */
/* 
 * reads : g_165
 * writes:
 */
static uint32_t  func_1(void)
{/* block id: 0 */
 return 1;
}


/* ---------------------------------------- */
int main (int argc, char* argv[])
{
    int i, j, k;
    int print_hash_value = 0;
    if (argc == 2 && strcmp(argv[1], "1") == 0) print_hash_value = 1;
    platform_main_begin();
    crc32_gentab();
    func_1();
    platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
    return 0;
}

我尝试添加 __complex 和 _Complex 作为关键字,但两者都显示错误,还有任何特定位置要放置复杂关键字,例如。在限定符之前还是在变量名之前?

4

0 回答 0