[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sv: Sv: Sv: Sv: Sv: PenguinFile



Bjarke Hammersholt Roune writes:
 > >"A string literal can be assigned to a char*. This is allowed because in
 > >previous definitions of C and C++. the type of a string literal was char*.
 > >Allowing the assignment of a string literal to a char* ensures that
 > >millions of lines of C and C++ remain valid. Ti is, however, an error to
 > >try to modify a string literal through such a pointer:
 > >[...]"
 > >
 > 
 > I actually wasn't aware of that. I think it should be an explicit compiler
 > option to allow this, though.
 > 
Apparently gcc-2.95 is going to make string litterals const from
now on.  This should cause warnings not errors, which is how I think
it should be.


Ahhh, arne't language holy-wars fun.