This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26011] New: References to const pointers to const objects don't work as expected.
- From: "ciprian dot craciun at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2006 00:38:56 -0000
- Subject: [Bug c++/26011] New: References to const pointers to const objects don't work as expected.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I think the best way to describe the problem is giving a simple piece of code:
int t1;
int t2;
int * a = &t1;
int const * const & b = a;
a = &t2;
printf ("test 2: %x %x\n", a, b);
if (a != b)
printf ("UPS!!!\n");
My gcc -v outputs:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
--
Summary: References to const pointers to const objects don't work
as expected.
Product: gcc
Version: 4.0.3
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ciprian dot craciun at gmail dot com
GCC build triplet: 4.0.3
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26011