id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
1749	mc does not build with Sun Studio compiler	sfionov	slavazanko	"Sun Studio C compiler has a bug parsing multi-level designated initializers when initializing an array of nested structures.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6888373

Part of build log:
{{{
        /bin/sh ../../libtool --tag=CC   --mode=compile /opt/sunstudio12.1/bin/cc -DHAVE_CONFIG_H -I. -I../..   -I/usr/X11/include -I../ -I../../src -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -DDATADIR=\""""/usr/share/mc/""\"" -DLOCALEDIR=\""""/usr/share/locale""\"" -g -c -o libmcviewer_la-dialogs.lo `test -f 'dialogs.c' || echo './'`dialogs.c           
 /opt/sunstudio12.1/bin/cc -DHAVE_CONFIG_H -I. -I../.. -I/usr/X11/include -I../ -I../../src -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ""-DDATADIR=\""/usr/share/mc/\"""" ""-DLOCALEDIR=\""/usr/share/locale\"""" -g -c dialogs.c  -KPIC -DPIC -o .libs/libmcviewer_la-dialogs.o                                                                                       
""dialogs.c"", line 82: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 82: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 82: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 82: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 82: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 82: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: structure/union designator used on non-struct/union type                                                                                                      
""dialogs.c"", line 83: warning: enum type mismatch: op ""=""
}}}
The problem is with initializers in QuickWidget macros from wtools.h.
The solution is to change look of initializers to be compiled even with buggy parser, or wait for next Sun Studio update.

Current Sun Studio users may use the attached patch. The patch does not affect behaviour of not buggy C99 compilers (e.g. GCC)."	defect	closed	major	4.7.0	mc-core	4.7.0-pre3	fixed						committed-master
