Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual
Product codes
SW006021-1
MPLAB
®
XC8 C Compiler User’s Guide
DS52053B-page 482
2012 Microchip Technology Inc.
C.6
FLOATING-POINT (G.3.6)
C.6.1
The representations and sets of values of the various types of
floating-point numbers (6.1.2.5)
floating-point numbers (6.1.2.5)
C.6.2
The direction of truncation when an integral number is
converted to a floating-point number that cannot exactly
represent the original value (6.2.1.3)
converted to a floating-point number that cannot exactly
represent the original value (6.2.1.3)
The integer value is rounded to the nearest floating-point value that can be repre-
sented.
sented.
C.6.3
The direction of truncation or rounding when a floating-point
number is converted to a narrower floating-point number
(6.2.1.4)
number is converted to a narrower floating-point number
(6.2.1.4)
The floating-point number is truncated to the smaller floating-point number.
C.7
ARRAYS AND POINTERS (G.3.7)
C.7.1
The type of integer required to hold the maximum size of an
array; that is, the type of the sizeof operator, size_t (6.3.3.4,
7.1.1)
array; that is, the type of the sizeof operator, size_t (6.3.3.4,
7.1.1)
The type of size_t is unsigned int.
C.7.2
The result of casting a pointer to an integer, or vice versa (6.3.4)
When casting an integer to a pointer variable, if the pointer variable throughout the
entire program is only assigned the addresses of objects in data memory or is only
assigned the address of objects in program memory, the integer address is copied with-
out modification into the pointer variable. If a pointer variable throughout the entire pro-
gram is assigned addresses of objects in data memory and also addresses of object in
program memory, then the MSb of the will be set if the address of the integer is cast to
a pointer to const type; otherwise the MSb is not set. The remaining bits of the integer
are assigned to the pointer variable without modification.
entire program is only assigned the addresses of objects in data memory or is only
assigned the address of objects in program memory, the integer address is copied with-
out modification into the pointer variable. If a pointer variable throughout the entire pro-
gram is assigned addresses of objects in data memory and also addresses of object in
program memory, then the MSb of the will be set if the address of the integer is cast to
a pointer to const type; otherwise the MSb is not set. The remaining bits of the integer
are assigned to the pointer variable without modification.
When casting a pointer to an integer, the value held by the pointer is assigned to the
integer without modification, provided the integer is not smaller than the size of the
pointer.
integer without modification, provided the integer is not smaller than the size of the
pointer.
C.7.3
The type of integer required to hold the difference between two
s to members of the same array, ptrdiff_t (6.3.6, 7.1.1)
s to members of the same array, ptrdiff_t (6.3.6, 7.1.1)
The type of ptrdiff_t is unsigned int.
C.8
REGISTERS (G.3.8)
C.8.1
The extent to which objects can actually be placed in registers
by use of the register storage-class specifier (6.5.1)
by use of the register storage-class specifier (6.5.1)
This specifier has no effect.