This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32588] New: Bogus "error: initializer element is not constant"
- From: "bero at arklinux dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jul 2007 16:11:56 -0000
- Subject: [Bug c/32588] New: Bogus "error: initializer element is not constant"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code (extracted from ffmpeg) produces "error: initializer element
is not constant":
typedef struct {
int num;
int den;
} AVRational;
static AVRational frame_rate = (AVRational) {25,1};
Replacing the last line with plain
static AVRational frame_rate = {25,1};
fixes it -- but shouldn't those lines be identical? They produced identical
code (and no warnings) with older gccs.
--
Summary: Bogus "error: initializer element is not constant"
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bero at arklinux dot org
GCC build triplet: i586-pc-linux-gnu
GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32588