* include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
* tests/test.c (run_one_test): Add GC_PTR_STORE test.
No longer test for RS6000.
+2007-08-14 Hans Boehm <Hans.Boehm@hp.com> (partly really Henrik Theiling)
+
+ * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
+ * tests/test.c (run_one_test): Add GC_PTR_STORE test.
+ No longer test for RS6000.
+
2007-08-03 Hans Boehm <Hans.Boehm@hp.com>
* alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
# define GC_PTR_STORE(p, q) \
(*(void **)GC_is_visible(p) = GC_is_valid_displacement(q))
#else /* !GC_DEBUG */
-# define GC_PTR_STORE(p, q) *((p) = (q))
+# define GC_PTR_STORE(p, q) (*(p) = (q))
#endif
/* Functions called to report pointer checking errors */
void run_one_test()
{
char *x;
+ char **z;
# ifdef LINT
char *y = 0;
# else
(void)GC_printf("GC_is_visible produced incorrect result\n");
FAIL;
}
+ z = GC_malloc(8);
+ GC_PTR_STORE(z, x);
+ if (*z != x) {
+ (void)GC_printf("GC_PTR_STORE failed: %p != %p\n", *z, x);
+ FAIL;
+ }
if (!TEST_FAIL_COUNT(1)) {
-# if!(defined(RS6000) || defined(POWERPC) || defined(IA64)) || defined(M68K)
- /* ON RS6000s function pointers point to a descriptor in the */
+# if!(defined(POWERPC) || defined(IA64)) || defined(M68K)
+ /* On POWERPCs function pointers point to a descriptor in the */
/* data segment, so there should have been no failures. */
/* The same applies to IA64. Something similar seems to */
/* be going on with NetBSD/M68K. */