This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18468] bad code in template function called from template class method
- From: "james_avera at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Nov 2004 02:47:38 -0000
- Subject: [Bug c++/18468] bad code in template function called from template class method
- References: <20041113203055.18468.james_avera@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From james_avera at yahoo dot com 2004-11-16 02:47 -------
Subject: Re: bad code in template function called from template class method
Hi,
Can you summarize what aliasing rule is violated?
Note that the argument is a ref, so the code is
not taking the adderess of a temporary.
Thanks,
-Jim
--- pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org>
wrote:
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org
> 2004-11-13 20:37 -------
> You are violating the C++ aliasing rules:
>
> class GetPtrtokeyFunctor {
> public:
> const PtrInt * operator()(const Objptr & objptr)
> { return reinterpret_cast<const PtrInt *>(&objptr); }
> };
>
>
>
> --
> What |Removed |Added
>
----------------------------------------------------------------------------
> Status|UNCONFIRMED |RESOLVED
> Resolution| |INVALID
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18468
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
=====
__________________________________________________
Please do not put me on a mailing list or give my
address(es) to anyone else.
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18468