Skip to contentSkip to conversation

structure initialization

DISCUSSION Jerry 2 participants 2 messages Jul 22, 2005 MIPS

lore
Share & tools
lore

Jerry

author
#0 lore raw

A kind of lame offtopic question :)
What reason in 2.6 to do structure init in this way:
struct a = {
.name = value
...

instead of 2.4-like:
struct a = {
name: value
...

Is this a bad form to use ".name" in 2.4 or "name:" in 2.6?

()_()
-( ^,^ )- -[21398845]- -<The Bat! 3.0.1.33>- -<22.07.2005 16:27>-
(") (")

#1 lore raw
Quoted 7 lines · Jerry

A kind of lame offtopic question :)
What reason in 2.6 to do structure init in this way:
struct a = {
.name = value
...

Quoted 6 lines

instead of 2.4-like:
struct a = {
name: value
...

Is this a bad form to use ".name" in 2.4 or "name:" in 2.6?

name: is the obsolete GNU gcc extension, .name = is C99. The C99 style is strongly preferred now.

Thiemo