Bug 115775 - g++ 3.2.3-1 fails on "int i[8] = { [0] 0, };"
g++ 3.2.3-1 fails on "int i[8] = { [0] 0, };"
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-15 19:10 EST by Maciej Żenczykowski
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 3.3.3-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-17 08:01:10 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)

  None (edit)
Description Maciej Żenczykowski 2004-02-15 19:10:57 EST
Fedora Core 1, all up2date.
gcc-c++-3.3.2-1  gcc-3.3.2-1  libgcc-3.3.2-1

Compiles as C not as C++.  Even if this isn't a legal extension (is
it?) in C++ mode it should still fail gracefully - although personally
I see no reason for it to be illegal C++.

$ cat z.c
int i[8] = {
  [0] 0,
};

$ gcc z.c
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/../../../crt1.o(.text+0x18):
In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status

$ g++ z.c
c:3: internal compiler error: in size_binop, at fold-const.c:1438
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccQTYUo9.out file, please attach
this to your bugreport

$ cat /tmp/ccQTYUo9.out 
// /usr/lib/gcc-lib/i386-redhat-linux/3.3.2/cc1plus -quiet
-D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -D_GNU_SOURCE
z.c -D__GNUG__=3 -quiet -dumpbase z.c -auxbase z -o -
# 1 "z.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "z.c"
int i[8] = {
  [0] 0,
};

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