PatchSet 4008 
Date: 2003/09/01 19:34:50
Author: jim
Branch: HEAD
Tag: (none) 
Log:
Fix some "type punning" warnings in gcc 3.x

Members: 
        ChangeLog:1.1604->1.1605 
        include/kaffe/jmalloc.h:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1604 kaffe/ChangeLog:1.1605
--- kaffe/ChangeLog:1.1604      Mon Sep  1 17:16:15 2003
+++ kaffe/ChangeLog     Mon Sep  1 19:34:50 2003
@@ -1,5 +1,17 @@
 2003-09-01  Jim Pick  <[EMAIL PROTECTED]>
 
+       * include/kaffe/jmalloc.h:
+       Avoid KFREE() related "type punning" warnings in gcc 3.x
+       when compiling using --with-vmdebug.
+
+       This revert's egp's changes which were to "Avoid casting in
+       call to KFREE().".  I didn't understand why that was an
+       issue (or even why we're zeroing out the pointers, in the
+       first place, I assume it's got something to do with some
+       gc interaction).
+       
+2003-09-01  Jim Pick  <[EMAIL PROTECTED]>
+
        * configure.in:
        Check for stdarg.h (needed by valist.m4 varargs
        checks, otherwise varargs.h is used, which fails
Index: kaffe/include/kaffe/jmalloc.h
diff -u kaffe/include/kaffe/jmalloc.h:1.1 kaffe/include/kaffe/jmalloc.h:1.2
--- kaffe/include/kaffe/jmalloc.h:1.1   Thu Jul 31 22:46:43 2003
+++ kaffe/include/kaffe/jmalloc.h       Mon Sep  1 19:34:51 2003
@@ -29,11 +29,11 @@
 #define KFREE(p)       jfree((void *)(p))
 
 #ifdef KAFFE_VMDEBUG
+/* Does anybody know why we are doing this? */
 #undef KFREE
 #define KFREE(p)       do {                    \
-       void **__kfree_p = (void **)&(p);       \
-       jfree (*__kfree_p);                     \
-       *__kfree_p = (void *)0;                 \
+       jfree ((void *)p);                      \
+       p = (void *)0;                          \
 } while (0)
 #endif
 

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to