Bug 115775 - g++ 3.2.3-1 fails on "int i[8] = { [0] 0, };"
Summary: g++ 3.2.3-1 fails on "int i[8] = { [0] 0, };"
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-16 00:10 UTC by Maciej Żenczykowski
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 3.3.3-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-17 13:01:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Maciej Żenczykowski 2004-02-16 00:10:57 UTC
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.