initializer element is not constant
Geoffrey KEATING
geoffk@discus.anu.edu.au
Sat Jun 27 21:42:00 GMT 1998
> From: hjl@lucon.org (H.J. Lu)
> Date: Fri, 26 Jun 1998 18:28:59 -0700 (PDT)
[Matt said:]
> > FILE *infp = stdin;
> >
> > and the gcc error is:
> >
> > mknodes.c:92: initializer element is not constant
> >
> > to fix it, ive just changed all the infp usages to stdin. but what's the
> > real fix?
> main ()
> {
> infp = stdin;
> }
Or for those cases when this is inconvenient,
FILE *infp;
static void infp_construct (void) __attribute__((constructor));
static void infp_construct (void) { infp = stdin; }
--
Geoff Keating <Geoff.Keating@anu.edu.au>
More information about the Libc-alpha
mailing list