Bug 57907 - gcc-3.1-0.11 fails to compile kernel 2.4.18-pre1 (or any kernel)
gcc-3.1-0.11 fails to compile kernel 2.4.18-pre1 (or any kernel)
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-31 17:16 EST by Need Real Name
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-01 17:07:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 17:20 EST, Need Real Name
no flags Details

  None (edit)
Description Need Real Name 2001-12-31 17:16:32 EST
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 17:20:33 EST
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 17:07:08 EST
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 11:31:49 EST
Should be fixed in gcc-3.1-0.16.
Comment 4 Need Real Name 2002-01-07 11:57:29 EST
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.