www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/10/20/20:01:52

Message-ID: <380E211A.BCAC8E1C@keycomm.it>
Date: Wed, 20 Oct 1999 22:07:54 +0200
From: leopoldo cerbaro <cerbaro AT keycomm DOT it>
X-Mailer: Mozilla 4.51 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: pgcc AT delorie DOT com
Subject: non constant initializers
Reply-To: pgcc AT delorie DOT com

Hi,
I don't understand why the pgcc (under stampede) gives the error "non-constant
initializer"
with the code below, while gcc and egcc (under debian) don't give it.
Is there some switch that one can apply?
Are the files stdio.h different?
--------
#include <stdio.h>

FILE *outfile = stdout;

int main (int argc, char *argv[]) {
   int x = 10;
   fprintf(outfile, "%d", x);
   return 0;
}
-------
The offending line is FILE ...
Note that if it is after main all goes well
Many thanks
PLEASE ANSWER TO MY ADDRESS, 'CAUSE I'M NOT IN THE MAILING LIST
Leopoldo Cerbaro

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019