Bug 57907 - gcc-3.1-0.11 fails to compile kernel 2.4.18-pre1 (or any kernel)
Summary: gcc-3.1-0.11 fails to compile kernel 2.4.18-pre1 (or any kernel)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-31 22:16 UTC by Need Real Name
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-01-01 22:07:13 UTC
Embargoed:


Attachments (Terms of Use)
The output of gcc-E on kernel/printk.c, which shows the full declaration of log_wait, e.g. (374.09 KB, text/plain)
2001-12-31 22:20 UTC, Need Real Name
no flags Details

Description Need Real Name 2001-12-31 22:16:32 UTC
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:

Comment 1 Need Real Name 2001-12-31 22:20:33 UTC
Created attachment 41551 [details]
The output of gcc-E on kernel/printk.c, which shows the full declaration of log_wait, e.g.

Comment 2 Jakub Jelinek 2002-01-01 22:07:08 UTC
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).

Comment 3 Jakub Jelinek 2002-01-07 16:31:49 UTC
Should be fixed in gcc-3.1-0.16.

Comment 4 Need Real Name 2002-01-07 16:57:29 UTC
Indeed, it was fixed in gcc-3.1-0.14.



Note You need to log in before you can comment on or make changes to this bug.