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: unassig...@gcc.gnu.org
        ReportedBy: piotr.wyder...@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.

Reply via email to