AutosarC++18_03-A1.4.3

All code should compile free of compiler warnings

Required inputs: IR

Rationale

Compiler warnings provide the earliest tool-supported indication of potential problems in source code. Developers should not ignore compiler warnings.

Note: Compiler warnings should be turned on to a level matching (as far as possible) the rules in this document, in particular A1-1-1. A possible enforcement of this rule is to turn compiler warnings into errors.

See Also
  • A1-1-1 in section 6.1.1

Possible Messages

Key

Text

Severity

Disabled

cafe_message

{}

None

False

Options

message_predicate

message_predicate : typing.Callable[[Cafe_Message], bool] | None = None

If provided, a custom predicate to filter relevant messages. Receives the message node and should return True for messages to report.
 

reported_messages

reported_messages : set[int] | None = None

If provided, only messages of these types are reported.
 

reported_severities

reported_severities : set[str] = {'error', 'warning'}

List of severities to display.
 

use_error_number

use_error_number : bool = False

Whether the error number from the frontend should be used.
 

use_rule_severity

use_rule_severity : bool = False

Whether the rule's severity or the compiler's severity should be used.