Last updated: 11:27 AM 2-Apr-2022 ---------- o Section 7.1 Objects, Lvalues, and Designators, Page 204: H&S states, "Expressions that cannot be lvalues include: array names, functions, enumeration constants, assignment expressions, casts, and function calls." This is *not* correct. As stated in Section 7.3.1, Page 208: H&S states, "The name of an array evaluates to that array; it is an lvalue, but not modifiable." This is correct. ---------- o Section 7.5.5 Bitwise Negation, Page 223: H&S fails to indicate the type of the result of the tilde (~) operator. Change the sentence "The result is not an lvalue" to be "The result has the promoted type and is not an lvalue." ---------- o Section 7.12 Order of Evaluation, Page 254, Second to last line of the paragraph before the example: H&S typo, "A similar freedom and restriction holds for each operand to a binary expression operand to a binary expression operatooperator and for a and i in the expression a[i]." Should be, "A similar freedom and restriction holds for each operand to a binary expression operator and for a and i in the expression a[i]." ---------- o This erratum concerns a simple assignment of an array to a pointer. For example, int A[10], *p; p = A; Although the text does mention in 5.4.1 Arrays and Pointers, Page 140, that, "First when an array identifier appears in an expression, the type of the identifier is converted from "array of T" to "pointer to T," and the value of the identifier is converted to a pointer to the first element of the array." (and the errata mentions that this should "be qualified by the three exceptions to the rule"...) A similar issue exists for simple assignment of a function returning T to a pointer to function returning T as in, int f(void); int main(void) { int (*pf)(void); pf = f; return (*pf)(); } int f(void) { return 1; } The text does mention in 5.8 Function Types, Page 167, that, "An expression of type 'function returning...' that is not used in a function call, as the argument of the address operator, &, or as the argument of the sizeof operator is immediately converted to the type 'pointer to function returning...'" Both the statements in 5.4.1 and in 5.8 would be sufficient to deal with what happens to the rhs in simple assignment *and* everywhere else in the language, but there is special mention in the usual unary conversions (Table 6-5 Usual unary conversions (choose first that applies), Page 197) to deal with operands of type "array of T" or of type "function returning T." This mention suggests that perhaps it is only in the usual unary conversions that the conversions of "array of T" or of type "function returning T" take place. The only reason that this question exists for simple assignment is that the usual unary conversions are not applied to the right-hand side of simple assignment. In 7.9.2 Compound Assignment, Page 248, dealing with compound assignment, it states that "the operation indicated by the operator op is applied to the two operand values, including any 'usual conversions' performed by the operator." This is sufficient to cause the usual unary conversions to be applied. In 7.9.1 Simple Assignment, Page 247, dealing with simple assignment, there is mention that "the name of an array appearing on the right-hand side of an assignment is converted (by the usual conversions) to be a pointer to the first element...," but the only applicable "usual conversion" is the "assignment conversions," and this conversion is not mentioned there. I believe that the easiest way to correct these issues would be to include in Table 6-3 Allowable assignment conversions in section 6.3.2 The Assignment Conversions, Page 195, that an allowable assignment conversion would be to include two more lines: Left side type Permitted right side types pointer to (object) T1 (d) array of T1 pointer to (function) F1 (c) function F1 ----------