On 14-Apr-2006, Jack Klein <ja*******@spamcop.net> wrote:
Not unless _your_ compiler is broken. The following program is
strictly conforming.
#include <stdio.h>
extern unsigned const x = 1;
--------------------------------------
Here was my original input:
(main.c)
const unsigned int x = 1;
initialize_vars.c (module)
extern unsigned int x;
When I compiled 'initialize_vars.c' , I received this error:
Error[46] D:\job1020\clock_generator\initialize_vars.c 39 : Expecting an =
D:\job1020\clock_generator\initialize_vars.o ===> 1 Errors, 0 Warnings.
Next I changed 'extern unsigned int x;' to
extern unsigned int x =1;
This time it compiled without errors.
I suspect the compiler does not adopt all 'ANSI' 'C'.
---MikeF
*** Posted via a free Usenet account from
http://www.teranews.com ***