[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bug in gcc?
- From: roberto@... (Roberto Ierusalimschy)
- Date: Wed, 4 Apr 2007 18:35:00 -0300
> 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