This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49171] [C++0x][constexpr] Constant expressions support reinterpret_cast
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 03 Oct 2012 16:22:24 +0000
- Subject: [Bug c++/49171] [C++0x][constexpr] Constant expressions support reinterpret_cast
- Auto-submitted: auto-generated
- References: <bug-49171-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49171
--- Comment #4 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-10-03 16:22:24 UTC ---
(In reply to comment #3)
> Daniel, what's the status of this issue? Is there some consensus that GCC is
> actually Ok, we don't really want to reject reinterpret_casts?
My opinion is that gcc should start to implement the new core rules in regard
to reinterpret_cast *except* for cases that are well-defined.
> Because I would find very useful a constexpr std::addressof. For the time being
> we could certainly have it constexpr anyway and change the implementation
> details when/if the C++ front-end starts rejecting reintepret_casts, but I
> would rather not.
Exactly this usage of reinterpret_cast seems IMO to be well granted by the
standard - at least by the way I read it.