void GC_check_heap_proc(void)
{
# ifndef SMALL_CONFIG
- /* Ignore gcc no effect warning on the following. */
GC_STATIC_ASSERT((sizeof(oh) & (GRANULE_BYTES - 1)) == 0);
/* FIXME: Should we check for twice that alignment? */
# endif
This code works correctly (ugliness is to avoid "unused var" warnings) */
# define GC_STATIC_ASSERT(expr) do { if (0) { char j[(expr)? 1 : -1]; j[0]='\0'; j[0]=j[0]; } } while(0)
#else
-# define GC_STATIC_ASSERT(expr) sizeof(char[(expr)? 1 : -1])
+# define GC_STATIC_ASSERT(expr) (void) sizeof(char[(expr)? 1 : -1])
#endif
# if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
struct hblk *h; /* the new heap block */
GC_bool clear = GC_obj_kinds[kind].ok_init;
- /* Ignore gcc "no effect" warning on the following: */
GC_STATIC_ASSERT((sizeof (struct hblk)) == HBLKSIZE);
if (GC_debugging_started) clear = TRUE;
register int i;
DCL_LOCK_STATE;
-
- /* Ignore gcc "no effect" warning. */
GC_STATIC_ASSERT(sizeof(struct LeafDescriptor) % sizeof(word) == 0);
LOCK();
if (GC_explicit_typing_initialized) {