Skip to content

Commit

Permalink
custom_stdint: define int8_t as signed char
Browse files Browse the repository at this point in the history
I am no C standard expert, but after a lot of debugging and reading I
think that int8_t should be defined as signed char instead of char.

AFAICT the signedness of char is implementation defined so when
comparing toolchains with this header file you can get false-positives.

PS: I see that stdint_ia32.h defines int8_t as "signed char" so applying
this patch will make custom_stdint_x86.h consistent with stdint_ia32.h.
  • Loading branch information
SebastianBoe committed May 15, 2016
1 parent d100bd1 commit 3e955b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/custom_stdint_x86.h
Expand Up @@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#define int8_t char
#define int8_t signed char
#define uint8_t unsigned char

#define int16_t short
Expand Down

0 comments on commit 3e955b6

Please sign in to comment.