]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bitmap: Fix comment about tree representation
authorRichard Sandiford <rdsandiford@googlemail.com>
Tue, 2 Jun 2026 19:50:29 +0000 (20:50 +0100)
committerRichard Sandiford <rdsandiford@googlemail.com>
Tue, 2 Jun 2026 19:50:29 +0000 (20:50 +0100)
The bitmap_element comments appear to have the left and right children
the wrong way around: prev is the left (lower index) and next is the
right (higher index).

gcc/
* bitmap.h (bitmap_element): Fix left/right distinction in comments.

gcc/bitmap.h

index fbf0b6366ebb652fcdb780c345b8fb91c53ab90e..31d469425d4d610f8df2082eca8d65d16a5ca59b 100644 (file)
@@ -313,10 +313,10 @@ struct bitmap_obstack {
 
 struct GTY((chain_next ("%h.next"))) bitmap_element {
   /* In list form, the next element in the linked list;
-     in tree form, the left child node in the tree.  */
+     in tree form, the right child node in the tree.  */
   struct bitmap_element *next;
   /* In list form, the previous element in the linked list;
-     in tree form, the right child node in the tree.  */
+     in tree form, the left child node in the tree.  */
   struct bitmap_element *prev;
   /* regno/BITMAP_ELEMENT_ALL_BITS.  */
   unsigned int indx;