BYTE@Mit-Mc@sri-unix (11/25/82)
From: Roger L Long <BYTE@Mit-Mc> For those interested and who don't subscribe, I just though I'd mention that the December-82 issue of DR. DOBB'S JOURNAL has the first half of a listing of Small-C V.2. The second half will be published in the January-83 issue. (And hopefully someone will upload it to MC:) I haven't looked at the compiler in detail, however the article states that it differs from V.1 in the following ways: 1. Code optimization has been added. Programs are now typically 15 to 30 percent smaller than before. 2. Data initialization is supported for global variables, arrays, and pointers. Uninitialized objects default to binary zero. 3. Constant expressions are now evaluated at compile time. They may also be used as array dimensions, data initializers, and in "case" statements. 4. the #ifdef, #ifndef, #else, and #endif statements are supported with nesting. 5. The "extern" storage class is supported for global variable, array pointer, and function declarations. The effect is to declare them as external references to the assembler. 6. A mechanism for passing an argument count to called functions is provided. 7. The following new statements are now supported: a. for b. do/while c. switch/case/default d. goto 8. Lists of expressions are now permitted. 9. The assignment operators |=, ^=, &=, +=, -=, *=, /=, %=, >>=, and <<= are now supported. 10. The logical operators || and && are supported. Testing proceeds left to right and ceases when the outcome is known. 11. The operators ~ and ! are now supported 12. Local variables are now local to the block rather than the whole function. 13. The back-slash escape sequences for character and string constants have been added (per DDJ #56). There is more, but I think this gives you an idea what has been done. -roger