Hi Sorin,

the "old" notation with member : value is a GCC extension and obsolete (but still supported) since GCC 2.5 I believe.
The only remaining possibilities are:
C99, with the .member = value notation
or the basic C, where the values have to be complete and ordered correctly, with the obvious disadvantages.
what to do..

Sorin Otescu wrote:
Hi,

I've noticed that commit 7e032d95f71442b42c821e874a26099112f4917b (from 26 jan. 2008 !) introduces a change to the way struct members are initialized. The comment was:

MODULES: Use standard syntax for initialization of struct members in headers.

The change is from:

struct some_struct {
   member : value
}

to

struct some_struct {
   .member=value
}

This (although correct) has the unfortunate effect of breaking C++ module builds (of which I have a few) because g++ DOESN'T accept this [C99 standard] type of initialization in <direct/interface_implementation.h> even if surrounded with extern "C".
Is there a workaround? Do you plan to leave it as it is?

For now I've changed the affected header (specified above) to use member:value.

Regards,
Sorin
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev



--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to