[Python-Dev] unicode, "const"s and lvalues

Mark Favas mark.favas@csiro.au
Thu, 28 Jun 2001 05:45:17 +0800


Unreasonable as it may seem, my compiler really expects that entities
declared as const's not be used in contexts where a modifiable lvalue is
required. It gets all huffy, and refuses to continue compiling, even if
I speak nicely (in unicode) to it. I'll file a bug report. On the code,
not the compiler <wink>.
cc -c -O -Olimit 1500 -Dss_family=__ss_family -Dss_len=__ss_len -I.
-I./Include -DHAVE_CONFIG_H  -o Objects/unicodectype.o
Objects/unicodectype.c
cc: Error: Objects/unicodectype.c, line 67: In this statement, "ch" has
const-qualified type, but occurs in a context that requires a modifiable
lvalue. (neednonconst)
        ch += ctype->title;
--------^
cc: Error: Objects/unicodectype.c, line 69: In this statement, "ch" has
const-qualified type, but occurs in a context that requires a modifiable
lvalue. (neednonconst)
        ch += ctype->upper;
--------^
cc: Error: Objects/unicodectype.c, line 74: In this statement, "ch" has
const-qualified type, but occurs in a context that requires a modifiable
lvalue. (neednonconst)
        ch -= 0x10000;
--------^
cc: Error: Objects/unicodectype.c, line 362: In this statement, "ch" has
const-qualified type, but occurs in a context that requires a modifiable
lvalue. (neednonconst)
    ch += ctype->upper;
----^
cc: Error: Objects/unicodectype.c, line 366: In this statement, "ch" has
const-qualified type, but occurs in a context that requires a modifiable
lvalue. (neednonconst)
        ch -= 0x10000;
--------^
cc: Error: Objects/unicodectype.c, line 378: In this statement, "ch" has
const-qualified type, but occurs in a context that requires a modifiable
lvalue. (neednonconst)
    ch += ctype->lower;
----^
cc: Error: Objects/unicodectype.c, line 382: In this statement, "ch" has
const-qualified type, but occurs in a context that requires a modifiable
lvalue. (neednonconst)
        ch -= 0x10000;
--------^
make: *** [Objects/unicodectype.o] Error 1



-- 
Mark Favas  -   m.favas@per.dem.csiro.au
CSIRO, Private Bag No 5, Wembley, Western Australia 6913, AUSTRALIA