Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top