Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 230 2012-2013 Microchip Technology Inc.
A.6 INTEGERS
Implementation-Defined Behavior for Integers is covered in section G.3.5 of the ANSI
C Standard.
The following table describes the amount of storage and range of various types of
integers: (ISO 6.1.2.5)
What is the result of converting an integer to a shorter signed integer, or the result of
converting an unsigned integer to a signed integer of equal length, if the value cannot
be represented? (ISO 6.2.1.2)
There is a loss of significance. No error is signaled.
What are the results of bitwise operations on signed integers? (ISO 6.3)
Shift operators retain the sign. Other operators act as if the operand(s) are unsigned
integers.
What is the sign of the remainder on integer division? (ISO 6.3.5)
+
What is the result of a right shift of a negative-valued signed integral type? (ISO 6.3.7)
The sign is retained.
TABLE A-2: INTEGER TYPES
Designation Size (bits) Range
char 8 -128 127
signed char 8 -128 127
unsigned char 8 0 255
short 16 -32768 32767
signed short 16 -32768 32767
unsigned short 16 0 65535
int 16 -32768 32767
signed int 16 -32768 32767
unsigned int 16 0 65535
long 32 -2147483648 2147438647
signed long 32 -2147483648 2147438647
unsigned long 32 0 4294867295

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh