I know there are many similar questions to above question, but I am facing error while adding a GNU complex extension to the simple code base near the global variable declared.

    /*
    * 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;
}

I tried adding __complex as well as _Complex as keyword but both are showing errors , also is there any specific location where complex keyword is to be put,ex. before qualifiers or before variable name?

0

There are 0 best solutions below