[Bug 2046] New: RBTree header files are not C++ compatible

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri Mar 30 09:20:14 UTC 2012


https://www.rtems.org/bugzilla/show_bug.cgi?id=2046

             Bug #: 2046
           Summary: RBTree header files are not C++ compatible
    Classification: Unclassified
           Product: RTEMS
           Version: 4.10
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: cpukit
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: sebastian.huber at embedded-brains.de


We have

/opt/rtems-4.11/sparc-rtems4.11/sis/lib/include/rtems/rbtree.inl: In function
'rtems_rbtree_unique rtems_rbtree_is_unique(rtems_rbtree_control*)':
/opt/rtems-4.11/sparc-rtems4.11/sis/lib/include/rtems/rbtree.inl:410:41: error:
cannot convert 'bool' to 'rtems_rbtree_unique' in return

Why do we need the type

/**
 * @typedef rtems_rbtree_unique
 *
 * This enum type defines whether the tree can contain nodes with
 * duplicate keys.
 */
typedef enum {
  /** The tree is not unique, insertion of duplicate keys is performed
   *  in a FIFO manner. */
  RTEMS_RBTREE_DUPLICATE = false,
  /** The tree is unique, insertion of duplicate key is refused. */
  RTEMS_RBTREE_UNIQUE    = true
} rtems_rbtree_unique;

at all?  The score RBTree doesn't have it, here we use simply bool.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list