Is it safe to build with -fsigned-char with Android NDK?

前端 未结 1 1345
野性不改
野性不改 2021-02-09 02:01

For consistency with other platforms, I need to use signed char in some native code I\'m working on. But by default on Android NDK char type is u

1条回答
  •  醉话见心
    2021-02-09 02:28

    I have also encountered this issue tonight. char is treat as signed on x86, but changed to unsigned when run on Android device. This make my JNI libs don't work properly.

    After setting LOCAL_CFLAGS := -fsigned-char in Android.mk, my program works! Currently I found no side effect. Thanks.

    0 讨论(0)
提交回复
热议问题