This is the mail archive of the
mailing list for the GCC project.
Re: egcs-2.91.55 19980824 error on const references
- To: Hyman Rosen <hymie at prolifics dot com>
- Subject: Re: egcs-2.91.55 19980824 error on const references
- From: Todd Vierling <tv at pobox dot com>
- Date: Tue, 25 Aug 1998 15:44:47 -0400 (EDT)
- cc: egcs at cygnus dot com, egcs-bugs at cygnus dot com
On Tue, 25 Aug 1998, Hyman Rosen wrote:
: The following test program fails. It also fails in all earlier versions
: of gcc. Would someone please add it to the test suite?
You mean it "fails to keep c constant"? Without the `const's, that code
_should_ assign 0 to `c'. If the const should be errored about, then the
failure is not reporting the const error.
What is the defined behavior with "volatile const"? Is it defined as the
same as "volatile"--that is, no const behavior at all?
FWIW, the SunPro C++ for Solaris is the same as gcc/egcs.
: extern "C" int printf(const char *, ...);
: int main(int, char **)
: volatile const int c = 42;
: volatile int *p;
: volatile const int *&r = p;
: r = &c;
: *p = 0;
: if (c != 42)
-- Todd Vierling (Personal firstname.lastname@example.org; Bus. email@example.com)