Pete Wyckoff wrote:
[EMAIL PROTECTED] wrote on Tue, 30 May 2006 09:28 -0400:
Which is more common in compilers:

static struct foo foobar = {
        field1: value1,
        field4: value4
        };

OR what's shown below:

static struct foo foobar = {
        .field1 = value1,
        .field4 = value4
        };

The first is used by the kernel code, and has been around for quite a while. I'm not sure what the second form gives us that the first one doesn't. Unless there is a good reason otherwise we should probably stick with the most widely supported.

The first is a gcc-only extension, obsolete since gcc 2.5 according
to their manual.  The latter is part of the ISO C99 spec.  If we
were going to convert from the unnamed version to anything, I'd have
a strong preference for going with the spec.

Agree.

[snip]

I think our only problem would be with an old vendor-supplied
compiler.  And my feel is that we should not bother supporting such
if it reduces our code quality.  For the next release, let's leave
in the few places (dist-*.c, and soon statecomp) where these are
used and see if anybody complains.  It will be easy enough to back
it out.  Other opinions?

I totally agree with your logic and think this is the right thing to do.

Rob
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to