misleading statement in bugs.html#known
Per Bothner
per@bothner.com
Wed Dec 5 13:16:00 GMT 2001
The bugs.html files says 'FILE *yyin = stdin' "will not compile with GNU
libc (GNU/Linux libc6), because stdin is not a constant. This was done
deliberately, in order for there to be no limit on the number of open
FILE objects."
The latter has nothing to do with it. It is easy to make stdin be
a constant while still having no limit on the number of open FILE
objects. For example:
extern FILE __stdin;
@define stdin (&__stdin)
The point is that glibc allows you to *assign* to stdin, so it is
no longer constant. This is a questionable feature..
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Gcc
mailing list