Is int16_t subscription guaranteed?

Is the type int16_tdeclared <stdint.h>guaranteed, signed, or must it be signed? I would suggest that it will need to be signed, but, surprisingly, I can not find any convincing evidence (for example, references to the specification) that explicitly mention this anywhere.

Can anyone confirm this anyway? I would really appreciate specific references to the specification, if at all possible.

+3
source share
2 answers

n1256 7.18.1p1 says:

typedef u , , 6.2.5; , .

int16_t a uint16_t, int16_t .

7.18.1.1p1:

typedef intN_t N, no . , int8_t 8 .

.

EDIT: , , int16_t , . CHAR_BIT == 9, , int16_t.

+6

Source: https://habr.com/ru/post/1784345/


All Articles