HP aC++/HP C A.06.25 Release Notes

Table Of Contents
The +check=globals option is implied by +check=all.
+check=truncate[:explicit|:implicit]
The +check=truncate option enables runtime checks to detect data loss in
assignment when integral values are truncated. Data loss occurs if the truncated
bits are not all the same as the left most non-truncated bit for signed type, or not
all zero for unsigned type. Programs may contain intentional truncation at runtime,
such as when obtaining a hash value from a pointer or integer. To avoid runtime
failures on these truncations, the user can explicitly mask off the value: ch =
(int_val & 0xff);
explicit Turns on runtime checks for truncation on explicit user casts of
integral values, such as (char)int_val.
implicit Turns on runtime checks for truncation on compiler-generated
implicit type conversions, such as ch = int_val;.
+check=truncate (with no suboptions) turns on runtime checks for both explicit
cast and implicit conversion truncation
Note that the +check=all option does not imply +check=truncate. To enable
+check=truncate, you must explicitly specify it.
+check=bounds[:array|pointer|all|none]
The +check=bounds option has been enhanced to provide the option of checking
for out-of-bound references to buffers through pointer access as well as to array
variables. You can specify one of the following +check=bounds suboptions:
array Enables check for out-of-bounds references to array variables.
pointer Enables check for out-of-bounds references to buffers through pointer
access. The buffer could be a heap object, global variable, or local
variable. This suboption also checks out-of-bounds access through
common libc function calls such as strcpy, strcat, memset, and
so on. This check can create significant run-time performance
overhead.
all Enables out-of-bounds checks for both arrays and pointers. This is
equal to +check=bounds:array +check=bounds:pointer.
none Disables out-of-bounds checks..
+check=bounds (with no suboption) is equal to +check=bounds:array. This
may change in the future to also include +check=bounds:pointer.
When +check=all is specified, it enables +check=bounds:array only. To
enable the pointer out-of-bounds check, +check=bounds:pointer must be
specified explicitly.
34 What’s New in This Version