C in a Nutshell by Peter Prinz & Tony Crawford The unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification This page was updated June 20, 2008. UNCONFIRMED errors and comments from readers: (25) 3rd paragraph from the bottom; The reference to Table 2-4 should refer to Table 2-5 instead. (31) Example 2-3: 5th line of code; No other code should appear on the same line as a Preprocessor directive, not even a comment! For instance, I spent over an hour debugging an error caused by a student placing a semicolon after a #include directive. Your code is not guarunteed to compile. [34] 4th paragraph; 0x.02B3p0 should be 0x.02BCp0 {78} Examples after second paragraph; With gcc-4.0.0 (Mac OS X, PowerPC), the expression "sizeof(*int)" gives rise to a parse error ("parse error before 'int'"). Using "sizeof(int*) instead works fine. [114]in the for loop after 2nd paragraph; the comparison in the for loop *p < myArray + A_SIZE compares between an integer and a pointer which is not the intended purpose here. It gives warning on gcc 4.1.0 it should be p < myArray + A_SIZE so that for loop ends when we reach past the end of myArray. No warning then as we compare pointer to a pointer. {138} 2nd paragraph; In the typedef of a function pointer the book shows the following: typedef double func_t ( double, double ); I tried compiling it on gcc version 4.1.1 20070105 (Red Hat 4.1.1-51) and it gave me an error message. The correct syntax should be: typedef double (* func_t ) ( double, double ); [194] second 'else if' statement in example ; In the existing line, malloc will set aside 100 memory units (ARRAY_LEN = 100) pArray needs much more than that. the example in the book is: else if (( pArray = malloc( ARRAY_LEN )) == NULL ) it should be something like: else if (( pArray = malloc( sizeof(Record_t) * ARRAY_LEN )) == NULL ) {290} Last line of example program under 'cbrt' function; The second parameter to 'printf' should be 'dist_km' instead of 'sma_km'. (523) second paragraph; Example 19-4 will never build symbols. make to stderr: "make: Nothing to be done for 'symbols'. I'm just a beginner with programming so I tried it on three different computers with three different linux distributions (mandrake 8.2 lfs 6.2 and mandrake 10.1). Typed in the example by hand and copied and pasted it from Safari. As far as I can see the problem is with: SYMTABS = $(OBJ .o=.sym). It doesn't expand to the proper value. Also, in the book on page 523, second to last paragraph, it says: $(name: ending=new_ending). Please note the colon. It is different in the example (=without colon). Adapting the example like : SYMTABS = $(OBJ: .o=.sym) also does not work. When I just say: SYMTABS = circle.sym circulararea.sym it works properly.