1From lcc 4.0 to 4.1: 2 3Changes: 4 5See doc/4.html for changes in the code-generation interface. 6 7Warns about constants that are too large, eg, short x = 70000; 8 9Warns about expressions that have no effect. 10 11Unsigned shorts are now used for wide-character constants, and 12wchar_t is a typedef for unsigned short. 13 14More assertions in gen.c to confirm that the register allocator is 15configured correctly; ie, that the various masks, wildcards, 16clobbers, and targets are internally consistent. Full checking 17appears impractical, but there's still more than than there was 18before. 19 20On the SPARC, lcc now emits .type and .size directives 21unconditionally. 22 23On the x86, constants are now emitted into the text segment. 24 25If the environment variable "LCCDIR" is defined, it gives the directory 26that contains the preprocessor, the compiler proper, and the 27lcc-specific libraries. 28 29Under Windows, lcc searches the directories named in the environment 30variable "include" for header files. 31 32Errors fixed: 33 34Erroneously complained about unknown sizes for some const fields, eg, 35typedef struct foo ref; struct foo { const ref *q; int a; }; 36f(ref *p, int i) { return p->q[i].a; } 37 38-A -A erroneously complained about static main's that didn't conform 39to the ANSI-mandated "int main(void)" or "int main(int, char **)". 40 41Silently generated incorrect code for a structure copy with a 42post-incremented target, eg, 43struct { int x; } data = {1}, copy[2], *q = copy; 44main() { *q++ = data; } 45 46Generated incorrect values in some expressions with constant pointers. 47 48Silently truncated string literals longer than 4095 characters. 49 50Failed to emit debugging information for uninitialized globals. 51 52Failed to diagnose missing sizes in some multi-dimensioned array 53declarators, eg, extern int x[][10]; int x[5][]; 54 55Silently emitted incorrect sizes and initalizations for some 56incomplete multi-dimensioned arrays involving pointers and whose size 57is determined by the number of initializers. 58 59Set only the x.name field for some back-end symbols (eg, wildcards), 60and the uninitialized name field crashed some debugging output. 61 62uses() failed to check the register *set* as well as the register 63mask. There's no known bug demo, but a wildcard set might be 64contrived that would need the test. 65 66Crashed with -b on some conditional expressions involving calls, eg, 67int p; void g(void) { p ? f() : 1; } 68 69On the MIPS, sometimes generated an incorrect frame size and thus a 70crash when floating-point registers were saved. 71 72On the SPARC, erroneously reused a register variable as a temporary 73when the variable is compiler-generated. 74 75On the SPARC with -b, emitted incorrect code for returning structs. 76 77On the x86, conversion from float to int rounded instead of truncated 78with the default floating-point mode. 79 80On the x86, eliminate rtargets for kids after the first (see p. 419). 81 82On the x86, substitute reg for freg, in order to use the common reg 83rules. Needed only for debugging output, since we're not using any 84float regs as regs at this time. 85 86On the x86, "double f(); main(){f();}" wasn't popping the FP register stack. 87 88On the x86, ECX was saved by the callee, when it should have been 89saved by the caller. 90 91$Id: LOG 145 2001-10-17 21:53:10Z timo $ 92