466
|
1 <appendix>
|
|
2 <title>Compiler Generated Error Messages</title>
|
|
3 <para>
|
610
|
4 Below is a list of the error messages that the C compiler generates,
|
|
5 and, if applicable, probable causes and K & R Appendix A section
|
|
6 number (in parenthesis) to see for more specific information.
|
466
|
7 </para>
|
468
|
8 <variablelist>
|
|
9 <varlistentry><term>already a local variable</term>
|
|
10 <listitem>
|
|
11 <para>
|
|
12 Variable has already been declared at the current block level.
|
|
13 (8.1, 9.2)
|
|
14 </para>
|
|
15 </listitem>
|
|
16 </varlistentry>
|
466
|
17
|
468
|
18 <varlistentry><term>argument : <text></term>
|
|
19 <listitem>
|
|
20 <para>
|
|
21 Error from preprocessor. Self-explanatory. Most common cause
|
|
22 of this error is not being able to find an include file.
|
|
23 </para>
|
|
24 </listitem>
|
|
25 </varlistentry>
|
|
26
|
552
|
27 <varlistentry><term>argument error</term>
|
|
28 <listitem>
|
|
29 <para>
|
|
30 Function argument declared as type struct, union or function.
|
|
31 Pointers to such types, however are allowed. (10.1)
|
|
32 </para>
|
|
33 </listitem>
|
|
34 </varlistentry>
|
|
35
|
554
|
36 <varlistentry><term>argument storage</term>
|
552
|
37 <listitem>
|
|
38 <para>
|
610
|
39 Function arguments may only be declared as storage class
|
|
40 register. (10.1)
|
552
|
41 </para>
|
|
42 </listitem>
|
|
43 </varlistentry>
|
|
44
|
554
|
45 <varlistentry><term>bad character</term>
|
|
46 <listitem>
|
|
47 <para>
|
610
|
48 A character not in the C character set (probably a control
|
|
49 char) was encountered in the source file. (2)
|
554
|
50 </para>
|
|
51 </listitem>
|
|
52 </varlistentry>
|
|
53
|
|
54 <varlistentry><term>both must be integral</term>
|
552
|
55 <listitem>
|
|
56 <para>
|
610
|
57 >> and << operands cannot be FLOAT or DOUBLE. (7.5)
|
552
|
58 </para>
|
|
59 </listitem>
|
|
60 </varlistentry>
|
|
61
|
554
|
62 <varlistentry><term>break error</term>
|
552
|
63 <listitem>
|
|
64 <para>
|
610
|
65 The break statement is allowed only inside a while, do, for or
|
|
66 switch block. (9.8)
|
552
|
67 </para>
|
|
68 </listitem>
|
|
69 </varlistentry>
|
|
70
|
554
|
71 <varlistentry><term>can't take address</term>
|
552
|
72 <listitem>
|
|
73 <para>
|
610
|
74 & operator not allowed in a register variable. Operand must
|
|
75 otherwise be an lvalue. (7.2)
|
552
|
76 </para>
|
|
77 </listitem>
|
|
78 </varlistentry>
|
|
79
|
554
|
80 <varlistentry><term>cannot cast</term>
|
552
|
81 <listitem>
|
|
82 <para>
|
610
|
83 Type result of cast cannot be FUNCTION or ARRAY. (7.2, 8.7)
|
552
|
84 </para>
|
|
85 </listitem>
|
|
86 </varlistentry>
|
|
87
|
610
|
88 <varlistentry><term>cannot evaluate size</term>
|
552
|
89 <listitem>
|
|
90 <para>
|
610
|
91 Could not determine size from declaration or initializer.
|
|
92 (8.6, 14.3)
|
552
|
93 </para>
|
|
94 </listitem>
|
|
95 </varlistentry>
|
|
96
|
554
|
97 <varlistentry><term>cannot initialize</term>
|
552
|
98 <listitem>
|
|
99 <para>
|
610
|
100 Storage class or type does not allow variable to be
|
|
101 initialized. (8.6)
|
552
|
102 </para>
|
|
103 </listitem>
|
|
104 </varlistentry>
|
|
105
|
554
|
106 <varlistentry><term>compiler trouble</term>
|
552
|
107 <listitem>
|
|
108 <para>
|
610
|
109 Compiler detedted something it couldn't handle. Try compiling
|
|
110 the program again. If this error still occurs, contact
|
|
111 Microware.
|
552
|
112 </para>
|
|
113 </listitem>
|
|
114 </varlistentry>
|
|
115
|
554
|
116 <varlistentry><term>condition needed</term>
|
552
|
117 <listitem>
|
|
118 <para>
|
610
|
119 While, do, for, switch and if statements require a condition
|
|
120 expression. (9.3)
|
552
|
121 </para>
|
|
122 </listitem>
|
|
123 </varlistentry>
|
|
124
|
554
|
125 <varlistentry><term>constant expression required</term>
|
552
|
126 <listitem>
|
|
127 <para>
|
610
|
128 Initializer expressions for statis or external variables cannot
|
|
129 reference variables. They may, however, refer to the address
|
|
130 of a previously declared variable. This installation allows no
|
|
131 initializer expressions unless all operands are of type INT or
|
|
132 CHAR (8.6)
|
552
|
133 </para>
|
|
134 </listitem>
|
|
135 </varlistentry>
|
|
136
|
554
|
137 <varlistentry><term>constant overflow</term>
|
552
|
138 <listitem>
|
|
139 <para>
|
610
|
140 Input numeric constant was too large for the implied or
|
|
141 explicit type. (2.6, [PDP-11])
|
552
|
142 </para>
|
|
143 </listitem>
|
|
144 </varlistentry>
|
|
145
|
554
|
146 <varlistentry><term>constant required</term>
|
552
|
147 <listitem>
|
|
148 <para>
|
610
|
149 Variables are not allowed for array dimensions or cases. (8.3,
|
|
150 8.7, 9.7)
|
552
|
151 </para>
|
|
152 </listitem>
|
|
153 </varlistentry>
|
|
154
|
554
|
155 <varlistentry><term>continue error</term>
|
552
|
156 <listitem>
|
|
157 <para>
|
610
|
158 The continue statement is allowed only inside a while, do, or
|
|
159 for block. (9.9)
|
552
|
160 </para>
|
|
161 </listitem>
|
|
162 </varlistentry>
|
|
163
|
554
|
164 <varlistentry><term>declaration mismatch</term>
|
552
|
165 <listitem>
|
|
166 <para>
|
610
|
167 This declaration conflicts with a previous one. This is
|
|
168 typically caused by declaring a function to return a non-integer
|
|
169 type after a reference has been made to the function.
|
|
170 Depending on the line structure of the declaration block, this
|
|
171 error may be reported on the line following the erroneous
|
|
172 declaration. (11, 11.1, 11.2)
|
552
|
173 </para>
|
|
174 </listitem>
|
|
175 </varlistentry>
|
|
176
|
554
|
177 <varlistentry><term>divide by zero</term>
|
552
|
178 <listitem>
|
|
179 <para>
|
610
|
180 Divide by zero occurred when evaluating a constant expression.
|
552
|
181 </para>
|
|
182 </listitem>
|
|
183 </varlistentry>
|
|
184
|
554
|
185 <varlistentry><term>? expected</term>
|
552
|
186 <listitem>
|
|
187 <para>
|
610
|
188 ? is any character that was expected to appear here. Missing
|
|
189 semicolons or braces cause this error.
|
552
|
190 </para>
|
|
191 </listitem>
|
|
192 </varlistentry>
|
|
193
|
554
|
194 <varlistentry><term>expression missing</term>
|
552
|
195 <listitem>
|
|
196 <para>
|
610
|
197 An expression is required here.
|
552
|
198 </para>
|
|
199 </listitem>
|
|
200 </varlistentry>
|
|
201
|
554
|
202 <varlistentry><term>function header missing</term>
|
552
|
203 <listitem>
|
|
204 <para>
|
610
|
205 Statement or expression encountered outside a function.
|
|
206 Typically causes by mismatched braces. (10.1)
|
552
|
207 </para>
|
|
208 </listitem>
|
|
209 </varlistentry>
|
|
210
|
554
|
211 <varlistentry><term>function type error</term>
|
552
|
212 <listitem>
|
|
213 <para>
|
610
|
214 A function cannot be declared as returning an array, function,
|
|
215 struct, or union. (8.4, 10.1)
|
552
|
216 </para>
|
|
217 </listitem>
|
|
218 </varlistentry>
|
|
219
|
554
|
220 <varlistentry><term>function unfinished</term>
|
552
|
221 <listitem>
|
|
222 <para>
|
610
|
223 End-of-file encountered before the end of function definition.
|
|
224 (10.1)
|
552
|
225 </para>
|
|
226 </listitem>
|
|
227 </varlistentry>
|
|
228
|
554
|
229 <varlistentry><term>identifier missing</term>
|
552
|
230 <listitem>
|
|
231 <para>
|
610
|
232 Identifier name required here but none was found.
|
552
|
233 </para>
|
|
234 </listitem>
|
|
235 </varlistentry>
|
|
236
|
554
|
237 <varlistentry><term>illegal declaration</term>
|
552
|
238 <listitem>
|
|
239 <para>
|
610
|
240 Declarations are allowed only at the beginning of a block.
|
|
241 (9.2)
|
552
|
242 </para>
|
|
243 </listitem>
|
|
244 </varlistentry>
|
|
245
|
554
|
246 <varlistentry><term>label required</term>
|
552
|
247 <listitem>
|
|
248 <para>
|
610
|
249 Label name required on goto statement. (9.11)
|
552
|
250 </para>
|
|
251 </listitem>
|
|
252 </varlistentry>
|
|
253
|
554
|
254 <varlistentry><term>label undefined</term>
|
552
|
255 <listitem>
|
|
256 <para>
|
610
|
257 Goto to label not defined in the current function. (9.12)
|
552
|
258 </para>
|
|
259 </listitem>
|
|
260 </varlistentry>
|
|
261
|
554
|
262 <varlistentry><term>lvalue required</term>
|
552
|
263 <listitem>
|
|
264 <para>
|
610
|
265 Left side of assigment must be able to be "stored into".
|
|
266 Array names, functions, structs, etc. are no lvalues. (7.1)
|
552
|
267 </para>
|
|
268 </listitem>
|
|
269 </varlistentry>
|
|
270
|
554
|
271 <varlistentry><term>multiple defaults</term>
|
552
|
272 <listitem>
|
|
273 <para>
|
610
|
274 Only one default statement is allowed in a switch block. (9.7)
|
552
|
275 </para>
|
|
276 </listitem>
|
|
277 </varlistentry>
|
|
278
|
554
|
279 <varlistentry><term>multiple definition</term>
|
552
|
280 <listitem>
|
|
281 <para>
|
610
|
282 Identifier name was declared more than once in the same block
|
|
283 level (9.2, 11.1)
|
552
|
284 </para>
|
|
285 </listitem>
|
|
286 </varlistentry>
|
|
287
|
554
|
288 <varlistentry><term>must be integral</term>
|
552
|
289 <listitem>
|
|
290 <para>
|
610
|
291 Type of object required here must be type int, char or pointer.
|
552
|
292 </para>
|
|
293 </listitem>
|
|
294 </varlistentry>
|
|
295
|
554
|
296 <varlistentry><term>name clash</term>
|
552
|
297 <listitem>
|
|
298 <para>
|
610
|
299 Struct-union member and tag names must be mutually distinct. (8.5)
|
552
|
300 </para>
|
|
301 </listitem>
|
|
302 </varlistentry>
|
|
303
|
554
|
304 <varlistentry><term>name in cast</term>
|
552
|
305 <listitem>
|
|
306 <para>
|
610
|
307 Identifier name found in a cast. Only types are allowed. (7.2, 8.7)
|
552
|
308 </para>
|
|
309 </listitem>
|
|
310 </varlistentry>
|
|
311
|
554
|
312 <varlistentry><term>named twice</term>
|
552
|
313 <listitem>
|
|
314 <para>
|
610
|
315 Names in a function parameter list may appear only once. (10.1)
|
552
|
316 </para>
|
|
317 </listitem>
|
|
318 </varlistentry>
|
|
319
|
554
|
320 <varlistentry><term>no 'if' for 'else'</term>
|
552
|
321 <listitem>
|
|
322 <para>
|
610
|
323 Else statement found with no matching if. This is typically
|
|
324 caused by extra or missing braces and/or semicolons. (9.3)
|
552
|
325 </para>
|
|
326 </listitem>
|
|
327 </varlistentry>
|
|
328
|
554
|
329 <varlistentry><term>no switch statement</term>
|
552
|
330 <listitem>
|
|
331 <para>
|
610
|
332 Case statements can only appear within a switch block. (9.7)
|
552
|
333 </para>
|
|
334 </listitem>
|
|
335 </varlistentry>
|
|
336
|
554
|
337 <varlistentry><term>not a function</term>
|
552
|
338 <listitem>
|
|
339 <para>
|
610
|
340 Primary in expression is not type "function returning...". If
|
|
341 this is really a function call, the function name was declared
|
|
342 differently elsewhere. (7.1)
|
552
|
343 </para>
|
|
344 </listitem>
|
|
345 </varlistentry>
|
|
346
|
554
|
347 <varlistentry><term>not an argument</term>
|
552
|
348 <listitem>
|
|
349 <para>
|
610
|
350 Name does not appear in the function parameter list. (10.1)
|
552
|
351 </para>
|
|
352 </listitem>
|
|
353 </varlistentry>
|
|
354
|
554
|
355 <varlistentry><term>operand expected</term>
|
552
|
356 <listitem>
|
|
357 <para>
|
610
|
358 Unary operators require one operand, binary operators two.
|
|
359 This is typically caused by misplaced parenthesis, casts or
|
|
360 operators. (7.1)
|
552
|
361 </para>
|
|
362 </listitem>
|
|
363 </varlistentry>
|
|
364
|
554
|
365 <varlistentry><term>out of memory</term>
|
552
|
366 <listitem>
|
|
367 <para>
|
554
|
368 Compiler dynamic memory overflow. The compiler requires
|
|
369 dynamic memory for symbol table entries, block level
|
|
370 declarations and code generation. Three major factors affect
|
|
371 this memory usage. Permanent declarations (those appearing on
|
|
372 the outer block level (used in include files)) must be
|
|
373 reserved from the dynamic memory for the duration of the
|
|
374 compilation of the file. Each { causes the compiler to perform
|
|
375 a block-level recursion which may involve "pushing down"
|
|
376 previous declarations which consume memory. Auto class
|
|
377 initializers require saving expression trees until past the
|
|
378 declarations which may be very memory-expensive if may exist.
|
|
379 Avoiding excessive declarations, both permanent and inside
|
|
380 compound statement blocks conserve memory. If this error
|
|
381 occurs on an auto initializer, try initializing the value in
|
|
382 the code body.
|
552
|
383 </para>
|
|
384 </listitem>
|
|
385 </varlistentry>
|
|
386
|
554
|
387 <varlistentry><term>pointer mismatch</term>
|
552
|
388 <listitem>
|
|
389 <para>
|
610
|
390 Pointers refer to different types. Use a case if required. (7.1)
|
552
|
391 </para>
|
|
392 </listitem>
|
|
393 </varlistentry>
|
|
394
|
554
|
395 <varlistentry><term>pointer or integer required</term>
|
552
|
396 <listitem>
|
|
397 <para>
|
610
|
398 A pointer (of any type) or integer is required to the left of
|
|
399 the '->' operator. (7.1)
|
552
|
400 </para>
|
|
401 </listitem>
|
|
402 </varlistentry>
|
|
403
|
554
|
404 <varlistentry><term>pointer required</term>
|
552
|
405 <listitem>
|
|
406 <para>
|
610
|
407 Pointer operand required with unary * operator. (7.1)
|
552
|
408 </para>
|
|
409 </listitem>
|
|
410 </varlistentry>
|
|
411
|
554
|
412 <varlistentry><term>primary expected</term>
|
552
|
413 <listitem>
|
|
414 <para>
|
610
|
415 Primary expression required here. (7.1)
|
552
|
416 </para>
|
|
417 </listitem>
|
|
418 </varlistentry>
|
|
419
|
554
|
420 <varlistentry><term>should be NULL</term>
|
552
|
421 <listitem>
|
|
422 <para>
|
610
|
423 Second and third expression of ?: conditional operator cannot
|
|
424 be pointers to different types. If both are pointers, they
|
|
425 must be of the same type or one of the two must be null. (7.13)
|
552
|
426 </para>
|
|
427 </listitem>
|
|
428 </varlistentry>
|
|
429
|
554
|
430 <varlistentry><term>**** STACK OVERFLOW ****</term>
|
|
431 <listitem>
|
|
432 <para>
|
610
|
433 Compiler stack has overflowed. Most likely cause is very deep
|
|
434 lock-level nesting or hundreds of switch cases.
|
554
|
435 </para>
|
|
436 </listitem>
|
|
437 </varlistentry>
|
|
438
|
|
439 <varlistentry><term>storage error</term>
|
552
|
440 <listitem>
|
|
441 <para>
|
610
|
442 Reg and auto storage classes mey only be used within functions.
|
|
443 (8.1)
|
552
|
444 </para>
|
|
445 </listitem>
|
|
446 </varlistentry>
|
|
447
|
554
|
448 <varlistentry><term>struct member mismatch</term>
|
552
|
449 <listitem>
|
|
450 <para>
|
610
|
451 Identical member names in two different structures must have
|
|
452 the same type and offset in both. (8.5)
|
552
|
453 </para>
|
|
454 </listitem>
|
|
455 </varlistentry>
|
|
456
|
554
|
457 <varlistentry><term>struct member required</term>
|
552
|
458 <listitem>
|
|
459 <para>
|
610
|
460 Identifier used with . and -> operators must be a structure
|
|
461 member name. (7.1)
|
552
|
462 </para>
|
|
463 </listitem>
|
|
464 </varlistentry>
|
|
465
|
554
|
466 <varlistentry><term>struct syntax</term>
|
552
|
467 <listitem>
|
|
468 <para>
|
610
|
469 Brace, comma, etc. is missing in a struct declaration. (8.5)
|
552
|
470 </para>
|
|
471 </listitem>
|
|
472 </varlistentry>
|
|
473
|
554
|
474 <varlistentry><term>struct or union inappropiate</term>
|
552
|
475 <listitem>
|
|
476 <para>
|
610
|
477 Struct or union cannot be used in the context.
|
552
|
478 </para>
|
|
479 </listitem>
|
|
480 </varlistentry>
|
|
481
|
554
|
482 <varlistentry><term>syntax error</term>
|
552
|
483 <listitem>
|
|
484 <para>
|
610
|
485 Expression, declaration or statement is incorrectly formed.
|
552
|
486 </para>
|
|
487 </listitem>
|
|
488 </varlistentry>
|
|
489
|
554
|
490 <varlistentry><term>third expression missing</term>
|
552
|
491 <listitem>
|
|
492 <para>
|
610
|
493 ? must be followed by a : with expression. This error may be
|
|
494 causes by unmatched parenthesis or other errors in the
|
|
495 expression. (7.13)
|
552
|
496 </para>
|
|
497 </listitem>
|
|
498 </varlistentry>
|
|
499
|
554
|
500 <varlistentry><term>too long</term>
|
552
|
501 <listitem>
|
|
502 <para>
|
610
|
503 Too many characters provided in a string initializing a
|
|
504 character array. (8.6)
|
552
|
505 </para>
|
|
506 </listitem>
|
|
507 </varlistentry>
|
|
508
|
554
|
509 <varlistentry><term>too many brackets</term>
|
552
|
510 <listitem>
|
|
511 <para>
|
610
|
512 Unmatched or unexpected brackets encountered processiong an
|
|
513 initializer. (8.6)
|
552
|
514 </para>
|
|
515 </listitem>
|
|
516 </varlistentry>
|
|
517
|
554
|
518 <varlistentry><term>too many elements</term>
|
552
|
519 <listitem>
|
|
520 <para>
|
610
|
521 More data items supplied for aggregate level in initializer
|
|
522 than members of the aggregate. (8.6)
|
552
|
523 </para>
|
|
524 </listitem>
|
|
525 </varlistentry>
|
|
526
|
554
|
527 <varlistentry><term>type error</term>
|
552
|
528 <listitem>
|
|
529 <para>
|
610
|
530 Compiler type matching error. Should never happen.
|
552
|
531 </para>
|
|
532 </listitem>
|
|
533 </varlistentry>
|
|
534
|
554
|
535 <varlistentry><term>type mismatch</term>
|
552
|
536 <listitem>
|
|
537 <para>
|
610
|
538 Types and/or operators in expression do not correspond. (6)
|
552
|
539 </para>
|
|
540 </listitem>
|
|
541 </varlistentry>
|
|
542
|
554
|
543 <varlistentry><term>typedef - not a variable</term>
|
552
|
544 <listitem>
|
|
545 <para>
|
610
|
546 Typedef type name cannot be used in this manner. (8.8)
|
552
|
547 </para>
|
|
548 </listitem>
|
|
549 </varlistentry>
|
|
550
|
554
|
551 <varlistentry><term>undeclared variable</term>
|
552
|
552 <listitem>
|
|
553 <para>
|
610
|
554 no declaration exists at any block level for this identifier.
|
552
|
555 </para>
|
|
556 </listitem>
|
|
557 </varlistentry>
|
|
558
|
554
|
559 <varlistentry><term>undefined structure</term>
|
552
|
560 <listitem>
|
|
561 <para>
|
610
|
562 Union or struct declaration refers to an undefined structure
|
|
563 name. (8.5)
|
552
|
564 </para>
|
|
565 </listitem>
|
|
566 </varlistentry>
|
|
567
|
554
|
568 <varlistentry><term>unions not allowed</term>
|
552
|
569 <listitem>
|
|
570 <para>
|
610
|
571 Cannot initialize union members. (8.6)
|
552
|
572 </para>
|
|
573 </listitem>
|
|
574 </varlistentry>
|
|
575
|
554
|
576 <varlistentry><term>unterminated character constant</term>
|
552
|
577 <listitem>
|
|
578 <para>
|
554
|
579 Unmatched ' character delimiters. (2.4.3)
|
552
|
580 </para>
|
|
581 </listitem>
|
|
582 </varlistentry>
|
|
583
|
554
|
584 <varlistentry><term>unterminated string</term>
|
552
|
585 <listitem>
|
|
586 <para>
|
|
587 Unmatched " string delimiters. (2.5)
|
|
588 </para>
|
|
589 </listitem>
|
|
590 </varlistentry>
|
|
591
|
|
592 <varlistentry><term>while expected</term>
|
|
593 <listitem>
|
|
594 <para>
|
554
|
595 No while found for do statement. (9.5)
|
552
|
596 </para>
|
|
597 </listitem>
|
|
598 </varlistentry>
|
|
599
|
468
|
600 </variablelist>
|
466
|
601 </appendix>
|