This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/32588] New: Bogus "error: initializer element is not constant"


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]