Compiling GCC With a C++ Compiler (g++)
Andreas Schwab
schwab@suse.de
Wed Oct 13 20:29:00 GMT 2004
Matt Austern <austern@apple.com> writes:
> I think this discussion is probably best conducted using precisely the
> wording in the C standard. I don't believe the phrase "read-only" is
> defined in that standard. Here's my analysis.
>
> Clause 6.7.3/5 says "If an attempt is made to modify an object defined
> with a const-qualified type through use of an lvalue with
> non-const-qualified type, the behavior is undefined."
Do we have an "object defined with a const-qualified type" in the first
place? I don't think we have. The object in question is obtained by the
equivalent of malloc() (called ggc_alloc_stat here) which returns a
modifiable object with a non-qualified type.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Gcc
mailing list