Python has a distinct integer division operator, "//".  7 // 3 returns the 
integer 2.

-----Original Message-----
From: [] On 
Behalf Of Jonathan Wakely
Sent: Monday, September 19, 2016 10:11 AM
Subject: [PATCH] libstdc++/77645 fix deque and vector xmethods for Python 3

The problem for these xmethods is that in Python 3 division of two integers 
produces a float, and GDB then doesn't allow that value to be used for pointer 
arithmetic (

        PR libstdc++/77645
        * python/libstdcxx/v6/ (DequeWorkerBase.__init__)
        (DequeWorkerBase.index, VectorWorkerBase.get): Cast results of
        division to int to work with Python 3.

Tested x86_64-linux, committed to trunk.

I'll fix it for gcc-5 and gcc-6 too.

Reply via email to