This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/12003] New: FILE* variable initialized to stderr (not constant error)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]