Update release notes.

This commit is contained in:
Stephen Heumann 2018-09-06 23:27:42 -05:00
parent 6f8546c964
commit f70f03d473

View File

@ -25,8 +25,8 @@ Updated by Stephen Heumann and Kelvin Sherlock, 2017-2018
8. Two new #pragma ignore bits are defined. See "Compiler changes
introduced in C 2.2.0".
9. A new #pragma lint bit is defined for checking *printf() and
*scanf() format strings and arguments. See "Format Checking."
9. Two new #pragma lint bits are defined. See "Format Checking"
and "Checking for Undefined Behavior in Computations."
10. Stack repair code is now more efficient.
@ -158,7 +158,11 @@ See "// Comments," below, for a complete description of // comments.
p. 259
The #pragma lint directive supports a new bit. If bit 4 (a value of 16) is set, the compiler will check if the format strings passed to the fprintf() and fscanf() families of functions are valid, and if the number and types of arguments passed to them match what the format strings call for. See "Format Checking," below.
The #pragma lint directive supports two new bits.
If bit 4 (a value of 16) is set, the compiler will check if the format strings passed to the fprintf() and fscanf() families of functions are valid, and if the number and types of arguments passed to them match what the format strings call for. See "Format Checking," below.
If bit 5 (a value of 32) is set, the compiler will check for several situations in computations that give rise to undefined behavior under the C standards. See "Checking for Undefined Behavior in Computations," below.
Also, note that the conditions detected by lint checks 1 and 2 are errors under C99 and later C standards. Thus, to make ORCA/C conform as closely as possible to those standards, at least "#pragma lint 3" should be used.
@ -174,6 +178,10 @@ Unions can be initialized by a brace-enclosed expression giving the initializer
union nums {float f; int i;} x = {0.0};
p. 311
If integer overflow occurs during signed integer multiplication, the resulting value is not predictable. Contrary to what the description in the manual implies, it will not necessarily be the low-order bits from the true product of the operands.
p. 321
The unary conversion rules have been modified to convert values of type char or unsigned char to int (rather than unsigned int), as required by the C standards.
@ -328,6 +336,20 @@ If these lint checks detect any errors, they will produce the error message "lin
(Kelvin Sherlock)
Checking for Undefined Behavior in Computations
-----------------------------------------------
ORCA/C now supports a new #pragma lint bit to enable checking for several situations in arithmetic computations or bit manipulation that give rise to undefined behavior according to the C standards. These are generally indicative of bugs, or (in code ported from other platforms) of assumptions that types have larger ranges than they do in ORCA/C.
These checks are enabled if #pragma lint bit 5 (a value of 32) is set. They currently check for the following conditions:
- Integer overflow from arithmetic in constant expressions of type int.
- Integer division by the constant zero (or remainder from such division).
- Invalid constant shift counts (negative, or >= the width of the type).
(Stephen Heumann)
New Headers
-----------
@ -713,6 +735,8 @@ int foo(int[42]);
82. Output from #pragma expand could contain string literals that were invalid or did not represent the same strings as those in the original program code. In order to fix this problem, #pragma expand has been changed to use three-digit octal escape sequences (rather than hexadecimal ones) in strings it outputs. (This ensures that subsequent characters in the string cannot be interpreted as part of the escape sequence.)
83. Constant expressions cast to char or unsigned char could be treated as if their type promoted to unsigned int rather than int.
-- Bugs from C 2.1.0 that have been fixed -----------------------------------
1. In some situations, fread() reread the first 1K or so of the file.