Re: std::atomic misbehaving on armeabi

172 views
Skip to first unread message

David Turner

unread,
Sep 19, 2012, 7:02:42 PM9/19/12
to andro...@googlegroups.com
NDK r7 didn't come with GCC 4.6, what are you using exactly?

On Wed, Sep 19, 2012 at 2:44 PM, Paolo Giangrandi <peoro...@gmail.com> wrote:
Hello,

I'm using android-ndk7 (with G++ 4.6) and am building a simple C++11 app targeting armeabi.
I'm noticing some issues with std::atomic: the operator= misbehaves.
Look to the following piece of code

std::atomic<void*> atomicPtr;
void *ptr = (void*) 0x12345678;
atomicPtr = ptr;
logger << (void*) ptr << ", " << (void*) atomicPtr;

I would expect it to print "0x12345678, 0x12345678", but instead I get unexpected results (like "0x12345678, 0xbede67a0").
I'm prone to think it's a bug with std::atomic, although couldn't look further into it.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/tkVG8ID88sUJ.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Reply all
Reply to author
Forward
0 new messages