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/16374] New: Global variable rejected


Hello,

the following program doesn't compile with GCC 3.3.3 under Mingw

#include <stdio.h>
#include <math.h>

double Pi=4*atan(1.0);

int main(int argc, char **argv)
{
  printf("%f",Pi);
  return 0;
}

The output is:
t.c:4: error: initializer element is not constant

GCC 3.4.0 works well.

-- 
           Summary: Global variable rejected
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andreas dot meier_ at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16374


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