T
Tim Clacy
Is this really C/C++?
struct device
{
char const* name;
};
device dev =
{
.name = "dev",
};
The Linux sources are littered with this kind of structure initialisation;
is it legal C/C++? I've just tried 3 different C/C++ compilers and none of
them accept this kind of member initialisation syntax
.name = "dev"
Is this syntax GNU 'C'-specific?
struct device
{
char const* name;
};
device dev =
{
.name = "dev",
};
The Linux sources are littered with this kind of structure initialisation;
is it legal C/C++? I've just tried 3 different C/C++ compilers and none of
them accept this kind of member initialisation syntax
.name = "dev"
Is this syntax GNU 'C'-specific?