Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  2 Dec 2004 11:27:24 +0000 (GMT)
From:      Richard Tobin <richard@inf.ed.ac.uk>
To:        Andrea Venturoli <ml.diespammer@netfence.it>, Rob <spamrefuse@yahoo.com>
Cc:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: gcc violates const-ness of variable?
Message-ID:  <20041202112724.657D21B43BB@macintosh.inf.ed.ac.uk>
In-Reply-To: Andrea Venturoli's message of Thu, 02 Dec 2004 10:51:29 %2B0100

next in thread | raw e-mail | index | archive | help
> IIRC "const" does not exist in *standardized* C...

No, it exists in both C89 and C99.  But the error is in your program,
not the compiler.  "const" in C is a promise that you do not change
the value, and you break that promise.

It may be different in C++, I don't know.

For definitive answers, try the newsgroups comp.lang.c and comp.lang.c++

-- Richard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041202112724.657D21B43BB>