1 <html><head><title> EiC's Bug Report List</title></head>
\r
3 <body bgcolor="white">
\r
7 Template bug report form
\r
8 ----------------------------------------------
\r
17 ----------------------------------------------
\r
18 REPORTER: Martin Gonda (9/1/96)
\r
20 Possibly fix up pre-processor, so that illegal
\r
21 statements which start with a hash (#) are caught.
\r
23 #hello ...would get through without an error
\r
26 STATUS: Fixed by Ed Breen
\r
27 ----------------------------------------------
\r
30 A failure to correctly process:
\r
32 EiC > for(i=0;i<3;i++) { int a[5]; }
\r
36 EiC 9> for(i=0;i<3;i++) { int a[5]; }
\r
38 0:checkar 2 0 10:rvalint 5 0
\r
39 1:pushint 20 11:incint 1
\r
40 2:massign 12 1 12:stoint 5 0
\r
41 3:pushint 0 13:decint 1
\r
42 4:stoint 5 0 14:rvalint 5 0
\r
44 6:rvalptr 1 1 16:pushint 3
\r
45 7:stoptr 0 1 17:ltint
\r
46 8:fmem 1 1 18:jmpTint 3
\r
47 9:reducear 2 19:halt
\r
51 The free memory instruction and the reducear instruction,
\r
52 lines 8 and 9, have been inserted too early. The resulting bytecode
\r
53 sequence should be more like:
\r
55 EiC 11> {for(i=0;i<3;i++) { int a[5]; }}
\r
57 0:checkar 2 0 10:stoint 5 0
\r
58 1:pushint 20 11:decint 1
\r
59 2:massign 1 1 12:rvalint 5 0
\r
60 3:pushint 0 13:bump 1
\r
61 4:stoint 5 0 14:pushint 3
\r
63 6:rvalptr 1 1 16:jmpTint 6
\r
64 7:stoptr 0 1 17:fmem 1 1
\r
65 8:rvalint 5 0 18:reducear 2
\r
68 The above solution forces an extra scoping level. However, this is not
\r
69 sensible for every translation unit entered at the command line. But
\r
70 maybe, EiC could keep track of the level of statement nesting
\r
71 also. Then it could addinlocals (parser.c) at the end of each zero
\r
72 level statement, in addition to the current method of when the scoping
\r
73 level drops back to file scope?
\r
75 if(S_LEVEL == 1 && Stmts == 0)
\r
78 TESTPROGRAM: see example
\r
79 STATUS: Fixed, as outlined in possible solution.
\r
80 ----------------------------------------------
\r
83 Correct the get float/double section in the _Uscanf
\r
85 for ungetting characters, for example,
\r
89 output should be 100 ergs.
\r
91 Solution requires 2 ungets not just 1.
\r
94 STATUS: Fixed by Ed Breen.
\r
95 ----------------------------------------------
\r
98 Correct the problem with builtin functions
\r
99 being prototyped when an error occurs. This problem
\r
100 means that the user will have to restart EiC
\r
101 to recover properly.
\r
104 It Has to do with the error recover stategy implemented when
\r
105 the signals were added to EiC.
\r
107 STATUS: Fixed (hopefully)
\r
108 ----------------------------------------------
\r
110 PROBLEM: Does not allow redeclaration of structure specifiers:
\r
112 struct Dvector { double x, y; };
\r
113 struct Dvector { double x, y; };
\r
115 Error in tptr2.c near line 6: Illegal use of struct/union
\r
116 Error in tptr2.c near line 8: Expected ;
\r
118 POSSIBLE SOLUTION: ?
\r
119 TESTPROGRAM: see example
\r
120 STATUS: Fixed by Ed Breen
\r
121 ----------------------------------------------
\r
123 PROBLEM: Memory leak caused when redefining an array:
\r
127 item 1865 Create line 264 file cdecl.c nbytes 20
\r
129 POSSIBLE SOLUTION: look at freetype.
\r
130 TESTPROGRAM: see example
\r
131 STATUS: Fixed, added routine freeArray to cdecl.c
\r
132 ----------------------------------------------
\r
134 PROBLEM: Memory leak caused by exit();
\r
136 see file t1.c; this directory
\r
140 item 4436 Create line 127 file interpre.c nbytes 1200
\r
141 item 4435 Create line 41 file typemod.c nbytes 16
\r
144 TESTPROGRAM: see example
\r
146 ----------------------------------------------
\r
148 PROBLEM: False diagnostic
\r
150 EiC 5> if (sizeof (char) * 8 == sizeof (double));
\r
151 Warning: in ::EiC:: near line 5: Non relational operation
\r
156 POSSIBLE SOLUTION: Because sizeof (char) * 8 == sizeof (double)
\r
157 resolves to a constant and this might be causing the
\r
159 TESTPROGRAM: see example
\r
160 STATUS: Fixed, corrected bug with unsigned
\r
161 constant binary relational operators not
\r
162 converting the result to int properly.
\r
163 ----------------------------------------------
\r
165 PROBLEM: Parses an incorrect declaration
\r
167 EiC 1> int (* foo[10])()[];
\r
170 foo -> ARY[10]* dec_Func (void ) returning ARY[0]int
\r
172 ... // Simplification of the problem
\r
174 EiC 10> int foo()[];
\r
177 foo -> dec_Func (void ) returning ARY[0]int
\r
181 POSSIBLE SOLUTION: Check function declaration
\r
183 TESTPROGRAM: see example
\r
184 STATUS: Fixed, added the check_decl function in
\r
185 the decl.c module. Not an optimal solution,
\r
186 but it catches both the above errors and
\r
188 ----------------------------------------------
\r
190 PROBLEM: False Ambiguous re-declaration
\r
192 let t.c contain the following two lines
\r
194 typedef struct { int a, b; } ab_t;
\r
195 ab_t * func(void) { ab_t * p; return p; }
\r
199 EiC 2> #include t.c
\r
203 EiC 4> #include t.c
\r
204 Error in t.c near line 30: Ambiguous re-declaration of `func'
\r
208 This has something to do with the memory being freed --
\r
209 I could make it illegal to remove the last
\r
210 occurrence of a structure. But that would make
\r
211 it impossible to change an existing structure. Better
\r
212 still, handle memory aliasing in a more creative
\r
213 way -- a big job, but probably worth it.
\r
218 STATUS: Fixed by Ed Breen -- it turned out to be
\r
221 ----------------------------------------------
\r
223 PROBLEM: EiC does not cast structures properly using va_args.
\r
226 typedef struct { int a, b; } ab_t;
\r
229 int p(char *fmt, ...)
\r
235 x = va_arg(ap, ab_t);
\r
241 // the following call returns garbage!
\r
248 The solution is to get the stack code to `drefptr' the pointer
\r
249 contained at the `ap' stack position, immediately before the `refmem'
\r
250 instruction. Although, this is easy to do, it upsets other existing
\r
251 code such as referencing members within an array of structures and
\r
252 structure assignments -- a rethink is in order.
\r
258 STATUS: Not Fixed, but the current EiC implementation
\r
259 flags the passing of a structure or union to
\r
260 a variadic function as an error.
\r
261 ----------------------------------------------
\r
266 <!-- ADDRESS field used for automatic automatic insertion of links -->
\r