https://gcc.gnu.org/g:bee542c6b13fb08607dc03aadf5cd5eef5fe6642

commit r17-1242-gbee542c6b13fb08607dc03aadf5cd5eef5fe6642
Author: Richard Sandiford <[email protected]>
Date:   Tue Jun 2 20:50:29 2026 +0100

    bitmap: Fix comment about tree representation
    
    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.

Diff:
---
 gcc/bitmap.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index fbf0b6366ebb..31d469425d4d 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -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;

Reply via email to