From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226 Description of problem: The compile fails as so: gcc -D__KERNEL__ -I/usr/local/src/linux-2.4.18-pre1-gcc3/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -DEXPORT_SYMTAB -c printk.c printk.c:55: initializer element is not constant printk.c:55: (near initialization for `log_wait.lock') printk.c:55: initializer element is not constant printk.c:71: initializer element is not constant printk.c:71: (near initialization for `console_sem.wait.lock') printk.c:71: initializer element is not constant printk.c:71: (near initialization for `console_sem.wait') gcc-3.1-0.10 compiled this fine. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Compile a recent kernel with gcc-3.1-0.11 Additional info:
Created attachment 41551 [details] The output of gcc-E on kernel/printk.c, which shows the full declaration of log_wait, e.g.
The thing is that gcc-3.1-0.11 and above support ISO C99 compound literals, and a compound literal definitely is not suitable for static storage object initializer. I've added an extension which accepts compound literals for those initializers but apparently using them in designated initializers does not work yet (note that the extension is only in non-ISO C99 mode).
Should be fixed in gcc-3.1-0.16.
Indeed, it was fixed in gcc-3.1-0.14.