At the moment the initialisation of the unions DEFAULT_RECTANGLE_STYLE, DEFAULT_CIRCLE_STYLE, DEFAULT_ELLIPSE_STYLE, and DEFAULT_POLYGON_STYLE does not conform to C89 standard (used e.g. by the Microsoft Visual C compiler). The attached patch
converts the incompatible parts of the initialisation to an assignment.
Patch
The C99 standard is already 12 years old. I think it is reasonable to expect that people can find a compiler that is less than a decade out of date. We should be moving forward, however slowly, rather than backward. By the same token, I'd like to see the code to use snprintf() everywhere.
I perfectly agree that it is the compiler that should be fixed. On the other hand, Visual C is a quasi standard on Windows (the Express variant is available for free). Personally, I am using the 2008 version because of its debugger and superior compilation speed.
Would you please reconsider this patch (or something similar)?
Forgot to log in. The last comment was by me.
This extended version of the patch introduces a new preprocessor define WITH_C89, which is currently only set by config/config.nt.
I am leaving this patch open so that it can be found more easily.
Revised version of the patch, updated to current CVS
According to its documentation, MSVC 2013 now supports C99/ANSI-C named field initialization.
MSVC 2013 indeed supports the used initializations, I just compiled the code without the patch successfully.
This is great news. Until glib/pango/cairo etc. can officially be build by MSVC 2013, we might have to stick to 2012 or earlier, though. Hence, I updated my patch to current CVS.