문제

I have to compile a large c++ library using clang. The library assumes that "char" is signed. Is there any way to tell it to the clang compiler? For this compiler, char is signed on x86, but it is unsigned on an arm target.

gcc has both options to make char signed or unsigned. For clang, I only found the /J switch which works the opposite way than it is needed in this case.

도움이 되었습니까?

해결책

The -fsigned-char switch appears to be what you're after. I don't have an ARM machine to try it on, but at least x86 clang accepts it without complaining.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top