X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fbitmap.c;h=ebbb6ee805ff4d8380b3e33fd5317e291aac6476;hb=911eca6f674f32320415982ed992ae6ab191d08a;hp=619c713a2c872fd045a17fa4a0e6f9624932da4f;hpb=2358393e3a0db63122498ce79a712bc28fa95f9e;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/bitmap.c b/gcc/bitmap.c index 619c713a2c8..ebbb6ee805f 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -44,7 +44,7 @@ static int bitmap_obstack_init = FALSE; /* Global data */ bitmap_element bitmap_zero_bits; /* An element of all zero bits. */ static bitmap_element *bitmap_free; /* Freelist of bitmap elements. */ -static GTY((deletable (""))) bitmap_element *bitmap_ggc_free; +static GTY((deletable)) bitmap_element *bitmap_ggc_free; static void bitmap_elem_to_freelist (bitmap, bitmap_element *); static void bitmap_element_free (bitmap, bitmap_element *); @@ -131,8 +131,7 @@ bitmap_element_allocate (bitmap head) obstack_chunk_free); } - element = (bitmap_element *) obstack_alloc (&bitmap_obstack, - sizeof (bitmap_element)); + element = obstack_alloc (&bitmap_obstack, sizeof (bitmap_element)); } } else @@ -349,7 +348,7 @@ bitmap_clear_bit (bitmap head, int bit) unsigned word_num = bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; ptr->bits[word_num] &= ~ (((BITMAP_WORD) 1) << bit_num); - /* If we cleared the entire word, free up the element */ + /* If we cleared the entire word, free up the element. */ if (bitmap_element_zerop (ptr)) bitmap_element_free (head, ptr); } @@ -415,7 +414,9 @@ bitmap_first_set_bit (bitmap a) #else for (word_num = 0; word_num < BITMAP_ELEMENT_WORDS; ++word_num) if ((word = ptr->bits[word_num]) != 0) - break; + goto word_found; + abort (); + word_found: #endif /* Binary search for the first set bit. */ @@ -470,7 +471,9 @@ bitmap_last_set_bit (bitmap a) #else for (word_num = BITMAP_ELEMENT_WORDS; word_num-- > 0; ) if ((word = ptr->bits[word_num]) != 0) - break; + goto word_found; + abort (); + word_found: #endif /* Binary search for the last set bit. */ @@ -728,23 +731,17 @@ debug_bitmap_file (FILE *file, bitmap head) { bitmap_element *ptr; - fprintf (file, "\nfirst = "); - fprintf (file, HOST_PTR_PRINTF, (void *) head->first); - fprintf (file, " current = "); - fprintf (file, HOST_PTR_PRINTF, (void *) head->current); - fprintf (file, " indx = %u\n", head->indx); + fprintf (file, "\nfirst = " HOST_PTR_PRINTF + " current = " HOST_PTR_PRINTF " indx = %u\n", + (void *) head->first, (void *) head->current, head->indx); for (ptr = head->first; ptr; ptr = ptr->next) { unsigned int i, j, col = 26; - fprintf (file, "\t"); - fprintf (file, HOST_PTR_PRINTF, (void *) ptr); - fprintf (file, " next = "); - fprintf (file, HOST_PTR_PRINTF, (void *) ptr->next); - fprintf (file, " prev = "); - fprintf (file, HOST_PTR_PRINTF, (void *) ptr->prev); - fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx); + fprintf (file, "\t" HOST_PTR_PRINTF " next = " HOST_PTR_PRINTF + " prev = " HOST_PTR_PRINTF " indx = %u\n\t\tbits = {", + (void*) ptr, (void*) ptr->next, (void*) ptr->prev, ptr->indx); for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) for (j = 0; j < BITMAP_WORD_BITS; j++)