Hmm.. Looks like a (mis)understanding problem.

The error means that you *can not* use non-constant expressions for
initializing the global data. Basically, you can not do this (except in case
you rewrite stdlib and make stderr, stdout etc. constants ;-). Period.

-- KD

-----Original Message-----
From: Satish Pagare <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Monday, October 11, 1999 10:12 PM
Subject: [LI] Help compilation problem !!!


>Hi  All,
> I have a strange problem while compiling the following code
>on RH6.0.
>-----begin code
>#include<stdio.h>
>FILE *fp = stderr;
>main()
>{
>}
>-----end code
>
>The above code gives compilation error :
>
>[kram@linux2idc net]$ cc a.c
>a.c:2: initializer element is not constant
>
>but if I change the  code to ....
>
>---begin code
>#include<stdio.h>
>FILE *fp;
>main()
>{
> fp = stderr;
>}
>--- end code
>the compilation goes through !!!!
>Please help to remove the errors. Pls reply to this mail ASAP to
>[EMAIL PROTECTED]
>
>
>:--------------------------------------------:
>   Is it AIR that you BREATHE?
>                    Morpheus. (time unknown)
>:--------------------------------------------:
>Satish K. Pagare,
>Visit me : http://www.geocities.com/asatsi
>Software Engineer.
>INFORMIX India Development Center.
>Mumbai - 400 096, INDIA.
>mailto:[EMAIL PROTECTED]
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>--------------------------------------------------------------------
>The Linux India Mailing List Archives are now available.  Please search
>the archive at http://lists.linux-india.org/ before posting your question
>to avoid repetition and save bandwidth.
>






--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.

Reply via email to