Question: I'm trying to compile a C code that contains the following lines:

```
//...
#ifdef CPU_GPREG_NAMES
static const char *reg_names[] = CPU_GPREG_NAMES;
#endif
//...

```

where the macro `CPU_GPREG_NAMES` is defined as:

```
#define CPU_GPREG_NAMES                                            \
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",                  \
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",                    \
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",                    \
"t8", "t9", "k0", "k1", "gp", "sp", "fp", "ra"                     \

```

However there seems to be a problem with the assignment in the first code snippet above, since I'm getting the following error on that specific line:

```
error: invalid initializer
error: expected identifier or '(' before string constant

```

**What is the cause of this error?**

Answer: 
You need curly braces to define your array for the initializer. You can either do:

```
#define CPU_GPREG_NAMES { \
     "zero", ... \
     ... \
}

```

or

```
static const char *reg_names[] = {CPU_GPREG_NAMES};     

```
You forget to put curly braces:

```
#define CPU_GPREG_NAMES  {                              \
    "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",   \
    "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",     \
    "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",     \
    "t8", "t9", "k0", "k1", "gp", "sp", "fp", "ra"      \
}

```

or

```
static const char *reg_names[] = {CPU_GPREG_NAMES};

```