Strange array initialize expression?

后端 未结 3 681
粉色の甜心
粉色の甜心 2020-11-30 10:15

What is the meaning of following Code? Code is from the regression test suite of GCC.

static char * name[] = {
   [0x80000000]  = \"bar\"
};
3条回答
  •  既然无缘
    2020-11-30 10:20

    It's a C99 designated initializer. the value in brackets specifies the index to receive the value.

提交回复
热议问题