AutosarC++17_10-A3.1.1

It shall be possible to include any header file in multiple translation units without violating the One Definition Rule

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

external_function_definition_in_header

External function definition in header file.

None

False

external_static_field_def_in_header

External definition in header file.

None

False

external_variable_definition_in_header

External variable definition in header file.

None

False

internal_function_declaration_in_header

Internal function declaration in header file.

None

False

internal_function_definition_in_header

Function definition in header file (with internal linkage).

None

False

internal_static_field_def_in_header

Definition in header file (with internal linkage).

None

False

internal_variable_definition_in_header

Variable definition in header file (with internal linkage).

None

False

tentative_variable_definition_in_header

Tentative variable definition in header file.

None

False

Options

accept_const_fields

accept_const_fields : bool = False

Whether const-qualified static fields in header files should be tolerated if they have internal linkage. Has no effect on violations about external definitions.
 

accept_const_variables

accept_const_variables : bool = True

Whether global const-qualified variables in header files should be tolerated if they have internal linkage. Has no effect on violations about external definitions.
 

find_non_external_function_declaration

find_non_external_function_declaration : bool = True

Whether function declarations with non-external linkage should be reported.
 

report_tentative_definitions

report_tentative_definitions : bool = False

Whether tentative definitions should be reported as well.