This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs-2.91.55 19980824 error on const references
- To: egcs at cygnus dot com, egcs-bugs at cygnus dot com
- Subject: egcs-2.91.55 19980824 error on const references
- From: Hyman Rosen <hymie at prolifics dot com>
- Date: Tue, 25 Aug 1998 10:28:44 -0400
configure --enable-shared --enable-threads
on both
Linux calumny 2.0.35 #1 Tue Jul 21 15:44:54 EDT 1998 i686 unknown
SunOS yanx 5.5.1 Generic_103640-18 sun4u sparc SUNW,Ultra-2
The following test program fails. It also fails in all earlier versions
of gcc. Would someone please add it to the test suite?
I don't mean to be obnoxious, but I'm going to keep on reporting this
until someone out there fixes it, or adds a test case for it, or at
least acknowledges its existence.
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)
printf("FAILED!\n");
}