2016-07-04 2:47 GMT+02:00 Benjamin Kaduk <bjkf...@gmail.com>: > I did not think that .th_offset.tv_sec was valid [...]
It is valid. The ".field = value" construct is called a 'designator' in C's grammar specification. What's on the left of the assignment is called a 'designator-list', which may consist of 1 or more 'designators'. There are two types of designators: '[constant-expression]' and '.identifier'. In other words, it is completely valid to write the following: struct foo bar = { .field[123].something = 456, .field[124].somethingelse = 789, }; Which is the same as: struct foo bar = { .field = { [123].something = 456, [124].somethingelse = 789, }, }; And: struct foo bar = { .field = { [123] = { .something = 456 }, [124] = { .somethingelse = 789 }, }, }; Best regards, -- Ed Schouten <e...@nuxi.nl> Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"