const char *mask_usage="mask netmask";
typedef struct
{
const char *name;
const char *doc;
}CmdForm;
static CmdForm parameter[] =
{
{"mask", mask_usage}
};
int main(int argc, char *argv[])
{
return 0;
}
~
clang-3.6 a.c
a.c:14:12: error: initializer element is not a compile-time constant
{"mask", mask_usage}
^~~~~~~~~~
1 error generated.
请问 mask_usage 为什么不是 compile-time constant?
c++ compiler 则编得过。