------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-15 
20:25 -------
  Type1* zone1 = reinterpret_cast<Type1*>(memory_block[0]);
  zone1->offset = 20;

  Type1* zone2 = reinterpret_cast<Type1*>(memory_block[20]);
  zone2->offset = 2 * 20;

  Type3* pageToUse = reinterpret_cast<Type3*>(memory_block[20]);


You are violating C++ aliasing rules. reinterpret_cast is still a normal cast.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20487

Reply via email to