[Bug c/12003] New: FILE* variable initialized to stderr (not constant error)
Castalia at idaeim dot com
gcc-bugzilla@gcc.gnu.org
Thu Aug 21 04:12:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12003
Summary: FILE* variable initialized to stderr (not constant
error)
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Castalia at idaeim dot com
CC: gcc-bugs at gcc dot gnu dot org
The code:
#include <stdio.h>
FILE *OUTPUT = stderr;
main ()
{
fprintf (OUTPUT, "Try this!\n");
exit (0);
}
Fails to build:
idaeim:castalia>> gcc try.c -o try
try.c:4: error: initializer element is not constant
idaeim:castalia>> gcc --version
gcc (GCC) 3.3.1 [FreeBSD]
idaeim:castalia>> uname -a
FreeBSD idaeim 4.8-STABLE FreeBSD 4.8-STABLE #0: Sun Jul 13 13:11:51 MST
2003 root@idaeim:/usr/obj/usr/src/sys/IDAEIM i386
N.B.: The same problem occurs with gcc 3.2.1,
but it does NOT occur with gcc 3.2.2 for Solaris.
More information about the Gcc-bugs
mailing list