Pelles C forum

Pelles C => Bug reports => Topic started by: Mikehg on January 14, 2006, 06:51:23 PM

Title: Bug : error #2069: Initializer must be constant
Post by: Mikehg on January 14, 2006, 06:51:23 PM
Hi Pelle,

I believe this should not be causing an error:

In global scope:

 char   a[2048];
 char  *b=&a[4];
 char  *c=b;   <--- This line

 test.c(129): error #2069: Initializer must be constant.

Thanks,
Mike Henning
Title: Bug : error #2069: Initializer must be constant
Post by: Pelle on January 14, 2006, 11:46:57 PM
Hello,

You are assigning variable b to c - this is not allowed in global scope.

Pelle
Title: Bug : error #2069: Initializer must be constant
Post by: Mikehg on January 15, 2006, 05:29:28 AM
Thanks Pelle,

It must only be valid in C++. I sometimes forget they are two different languages  #-o

Mike Henning