public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51379] New: reinterpret_cast is not particularly useful
@ 2011-12-01 12:57 piotr.wyderski at gmail dot com
  2011-12-01 12:58 ` [Bug c++/51379] " piotr.wyderski at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: piotr.wyderski at gmail dot com @ 2011-12-01 12:57 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-01 20:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-01 12:57 [Bug c++/51379] New: reinterpret_cast is not particularly useful piotr.wyderski at gmail dot com
2011-12-01 12:58 ` [Bug c++/51379] " piotr.wyderski at gmail dot com
2011-12-01 13:20 ` redi at gcc dot gnu.org
2011-12-01 13:59 ` jakub at gcc dot gnu.org
2011-12-01 14:07 ` redi at gcc dot gnu.org
2011-12-31 21:54 ` [Bug c++/51379] [C++0x] [DR 799] " paolo.carlini at oracle dot com
2012-01-01 20:22 ` paolo at gcc dot gnu.org
2012-01-01 20:24 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).