A Diagnostic Messages

The aC++ compiler can issue a large variety of diagnostics in response to unexpected situations or suspicious constructs. This appendix presents a summary of these diagnostics organized into the following sections:

“aC++ Message Catalog” (page 222)

“Frequently Encountered Messages” (page 222)

aC++ Message Catalog

The aC++ message catalog is located in the following directory:

/opt/aCC/lib/nls/msg/C/ecc.msgs

Error and warning messages in the aC++ message catalog can be classified as shown below:

Command Errors

Command errors are issued when the command line is not correctly formed and the compiler cannot proceed with compilation.

Command Warnings

Command warnings occur when code is compiled with an unrecognized option.

Fatal Errors

Fatal errors are issued for ill-formed programs that the compiler cannot recover. Syntax errors usually fall into this category. Object files are not generated if such errors are encountered.

Future Errors

Future errors are serious warnings that indicate violation of a language rule. However, the compiler continues to generate code. You must resolve these errors, as they may result in other cumulative errors. Use the +p option (pedantic mode) to convert these warnings into hard errors.

Anachronisms

Anachronisms are warnings that diagnose ISO/ANSI C++ language violation. Code that triggers anachronisms was previously considered legal.

Warnings

Warnings identify bugs in code, often because the code triggers behavior that is not precisely defined by the C++ standard.

Suggestion/Information

You must use the +w option to view these diagnotics. Without the +w option, the compiler identifies more suspicious constructs.

Tool Errors

Sometimes, HP aC++ fails in a component that is not specific to the C++ language. In such a case, a tool error is emitted. This error indicates defect in the compiler.

Frequently Encountered Messages

For a list and description of frequently encountered diagnostic messages, use the HP Code Advisor analysis tool (cadvise) or refer to the aC++ standard conformance and compatibility changes document accessible from the list of “HP aC++ Resources” at the bottom of the following URL:

http://www.hp.com/go/aCC

222 Diagnostic Messages

Page 222
Image 222
HP C/aC++ for PA-RISC Software manual Diagnostic Messages, AC++ Message Catalog, Frequently Encountered Messages