This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26011] References to const pointers to const objects don't work as expected.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2006 01:38:06 -0000
- Subject: [Bug c++/26011] References to const pointers to const objects don't work as expected.
- References: <bug-26011-12089@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-01-29 01:38 -------
int t1;
int t2;
int * a = &t1;
int const * const & b = a;
----
This does something different than you think.
It creates a temparory variable for the type, "const int *" as you need to
first convert a to that and then to "const int * const" as "const int * const"
is not compatiable with "int *".
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26011