This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51379] New: reinterpret_cast is not particularly useful
- From: "piotr.wyderski at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Dec 2011 12:56:57 +0000
- Subject: [Bug c++/51379] New: reinterpret_cast is not particularly useful
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51379
Bug #: 51379
Summary: reinterpret_cast is not particularly useful
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: piotr.wyderski@gmail.com
The following code:
int main() {
unsigned long t1 = 0;
unsigned long t2 = 1;
t1 = reinterpret_cast<unsigned long>(t2);
return 0;
}
compiled using GCC 4.6.2 on Linux/x64:
g++ test.cpp
fails displaying:
test.cpp:5:44: error: invalid cast from type 'long unsigned int' to type 'long
unsigned int'
IMHO this is a rather urgent issue.