diff mbox

[trans-mem] Fix compilation of libitm with recent gcc

Message ID 4E678FA3.4070800@unine.ch
State New
Headers show

Commit Message

Patrick Marlier Sept. 7, 2011, 3:37 p.m. UTC
Here the error when gcc compiles libitm:

../../../transactional-memory/libitm/aatree.h: In constructor 
‘GTM::aa_node_base::aa_node_base(GTM::aa_node_base::level_type)’:
../../../transactional-memory/libitm/aatree.h:53:16: error: 
list-initializer for non-class type must not be parenthesized [-Werror]

The fix just consists to remove the parenthesis.

Patrick.

Comments

Aldy Hernandez Sept. 14, 2011, 6:40 p.m. UTC | #1
Patrick Marlier <patrick.marlier@unine.ch> writes:

> Here the error when gcc compiles libitm:
>
> ../../../transactional-memory/libitm/aatree.h: In constructor
> ‘GTM::aa_node_base::aa_node_base(GTM::aa_node_base::level_type)’:
> ../../../transactional-memory/libitm/aatree.h:53:16: error:
> list-initializer for non-class type must not be parenthesized
> [-Werror]
>
> The fix just consists to remove the parenthesis.

I have run into the same problem while doing a merge from trunk.  This
will be fixed (with your patch ;-)) once I commit in the next few days.

Oh yeah, expect many changes to the branch once I commit.  We hadn't
done a merge in almost 1.5 years.

Thanks Patrick.
diff mbox

Patch

Index: aatree.h
===================================================================
--- aatree.h    (revision 178056)
+++ aatree.h    (working copy)
@@ -48,8 +48,8 @@ 

   public:
    aa_node_base(level_type l = 1)
-    : m_link({ const_cast<aa_node_base *>(&s_nil),
-            const_cast<aa_node_base *>(&s_nil) }),
+    : m_link { const_cast<aa_node_base *>(&s_nil),
+            const_cast<aa_node_base *>(&s_nil) },
        m_level(l)
    { }