------- Comment #1 from pinskia at gcc dot gnu dot org  2007-03-21 01:13 -------
This is definitely a C/C++ aliasing violation as you are first accessing it as
a MyHeap::Node and then as derived.
Here is how I would fix it for the first one I would change it to:
    void * newnode = malloc(bytes_needed);
    void *n = NULL;
    memcpy (newnode, &n, sizeof(n));
    Heads[bytes_needed] = newnode;

And use memcpy without a cast so you still have a "void*" and do the same for
the rest. and get rid of Node and just use void* instead.


-- 

pinskia at gcc dot gnu dot org changed:

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


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

Reply via email to