This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
BUG: stdin not a constant (fwd)
- To: gnu-win32 at cygnus dot com
- Subject: BUG: stdin not a constant (fwd)
- From: Peter David ROSS <petdr at students dot cs dot mu dot oz dot au>
- Date: Thu, 4 Dec 1997 11:54:30 +1100 (EST)
I forgot to mention that I am using release b18 under win95.
----- Forwarded message from petdr -----
Hi,
The following code doesn't compile.
------
#include <stdio.h>
static FILE *out = stdout;
void main(void)
{
/* out = stdout; */
fprintf(out, "hello world\n");
}
------
It gets the following error message:
test.c:3: initializer element is not constant
The fix is to remove the initialiser and add the line which is commented
out.
However the code I am trying to port has these sort of variables spread
all over the place, and I would like to know if there is someway I can
get the compiler to treat it as a constant.
Pete.
----
+----------------------------------------------------------------------+
| Peter Ross Sci/Eng Melbourne Uni |
| email: petdr@cs.mu.oz.au WWW: http://www.cs.mu.oz.au/~petdr |
+----------------------------------------------------------------------+
----- End of forwarded message from petdr -----
----
+----------------------------------------------------------------------+
| Peter Ross Sci/Eng Melbourne Uni |
| email: petdr@cs.mu.oz.au WWW: http://www.cs.mu.oz.au/~petdr |
+----------------------------------------------------------------------+
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".