Understanding and Handling Compiler Errors
2-37
C Compiler Description
Table 2
−
3. Example Error Messages
Error Level
Example Error Message
Code W
”file.c”, line 42:[W029] extra text after preprocessor directive ignored
Code E
”file.c”, line 66: [E055] illegal storage class for function ’f’
Code F
”file.c”, line 71: [F0108] structure member ’a’ undefined
Code I
”file.c”, line 99: [I011] block nesting too deep (max=20)
Other
>> Cannot open source file ’mystery.c’
2.8.1 Generating an Error Listing (
−
pr Option)
Use the
−
pr option to generate an error listing. The error listing has the name
source
.
err
, where
source
is the name of the C source file.
2.8.2 Treating Code-E Errors as Warnings (
−
pe Option)
A
fatal error
prevents the compiler from generating an output file. Normally,
code-E, -F, and -I errors are fatal, while -W errors are not. The
−
pe option
causes the compiler to treat code-E errors as warnings, so that the compiler
generates code for the file despite the error.
Using
−
pe allows you to bend the rules of the language, so be careful; as with
any warning, the compiler might not generate what you expect.
There is no way to specify recovery from code-F or -I errors. These errors are
always fatal.
See section 2.8.4,
An Example of How You Can Use Error Options
, for an ex-
ample of the
−
pe option.
2.8.3 Altering the Level of Warning Messages (
−
pw Option)
You can determine which levels of warning messages to display by setting the
warning message level with the
−
pw option. The number following
−
pw
denotes the level (0,1, or 2). Use Table 2
4 to select the appropriate level. See
section 2.8.4,
An Example of How You Can Use Error Options
, for an example
of the
−
pw option.
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...