Skip to main content

IAR Embedded Workbench for RISC-V 3.40

MISRAC++2023-6.9.1 (C++ only)

In this section:
Synopsis

(Required) The same type aliases shall be used in all declarations of the same entity

Enabled by default

Yes

Severity/Certainty

Medium/Medium

mediummedium.png
Full description

Different type alias used for same entity

Coding standards

This check does not correspond to any coding standard rules.

Code examples

The following code example fails the check and will give a warning:

using Index = int;

void example( int i);
void example( const Index ki );

The following code example passes the check and will not give a warning about this issue:

using Index = int;

void example( Index i);
void example( const Index ki );