3 ms·
struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; Is this legal ANSI C? You can initialize structs using .field = value ? Or is something else goin
by statictype 16y ago
struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
Is this legal ANSI C?
You can initialize structs using .field = value ?
Or is something else going on here?
- duiker101 16y agohttp://lxr.free-electrons.com/source/kernel/groups.c http://lxr.free-electrons.com/source/kernel/groups.c this should be the file i used. seems correct that way.
- ramchip 16y agoYes, it's C99. http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/topic/com.ibm.xlcpp8l.doc/language/ref/designators.htm#designators http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/top...
- deleted 16y ago[deleted]
- teraflop 16y agoIf by ANSI C you mean C89, then no. It was added in C99. I believe the feature is technically known as a "designated initializer". (http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf section 6.7.8)