SPRU514Z July 2001 – October 2023 SM320F28335-EP
The C/C++ compiler provides diagnostic options to control compiler- and linker-generated diagnostic messages. The diagnostic options must be specified before the --run_linker option.
--diag_error=num | Categorizes the diagnostic identified by num as an error. To determine the numeric identifier of a diagnostic message, use the --display_error_number option first in a separate compile. Then use --diag_error=num to recategorize the diagnostic as an error. You can only alter the severity of discretionary diagnostic messages. |
--diag_remark=num | Categorizes the diagnostic identified by num as a remark. To determine the numeric identifier of a diagnostic message, use the --display_error_number option first in a separate compile. Then use --diag_remark=num to recategorize the diagnostic as a remark. You can only alter the severity of discretionary diagnostic messages. |
--diag_suppress=num | Suppresses the diagnostic identified by num. To determine the numeric identifier of a diagnostic message, use the --display_error_number option first in a separate compile. Then use --diag_suppress=num to suppress the diagnostic. You can only suppress discretionary diagnostic messages. |
--diag_warning=num | Categorizes the diagnostic identified by num as a warning. To determine the numeric identifier of a diagnostic message, use the --display_error_number option first in a separate compile. Then use --diag_warning=num to recategorize the diagnostic as a warning. You can only alter the severity of discretionary diagnostic messages. |
--display_error_number | Displays a diagnostic's numeric identifier along with its text. Use this option in determining which arguments you need to supply to the diagnostic suppression options (--diag_suppress, --diag_error, --diag_remark, and --diag_warning). This option also indicates whether a diagnostic is discretionary. A discretionary diagnostic is one whose severity can be overridden. A discretionary diagnostic includes the suffix -D; otherwise, no suffix is present. See Section 2.7. |
--emit_warnings_as_ errors | Treats all warnings as errors. This option cannot be used with the --no_warnings option. The --diag_remark option takes precedence over this option. This option takes precedence over the --diag_warning option. |
--issue_remarks | Issues remarks (non-serious warnings), which are suppressed by default. |
--no_warnings | Suppresses diagnostic warnings (errors are still issued). |
--set_error_limit=num | Sets the error limit to num, which can be any decimal value. The compiler abandons compiling after this number of errors. (The default is 100.) |
--verbose_diagnostics | Provides verbose diagnostic messages that display the original source with line-wrap and indicate the position of the error in the source line. Note that this command-line option cannot be used within the Code Composer Studio IDE. |
--write_diagnostics_file | Produces a diagnostic message information file with the same source file name with an .err extension. (The --write_diagnostics_file option is not supported by the linker.) Note that this command-line option cannot be used within the Code Composer Studio IDE. |