lua-users home
lua-l archive

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


> Well, in fairness to the C and C++ folks, I don't think either standard
> specified whether a string literal is const or not, and lots of code
> assumes they aren't const.

At least in C, the standard defines that the type of a string literal is
"char*" (not const). But it also states that any attempt to modify the
contents of a string literal has undefined behavior...

-- Roberto