Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM Cost Reform

...

Constraint violations are a broad category of error that can result in unexpected control flow and corrupted data.

Rule

Severity

LikelihoodRemediation Cost

Detectable

Repairable

Priority

Level

MSC40-C

Low

Unlikely

No

MediumNo

P2P1

L3

Automated Detection

typespecifierundeclaredparameterincompatible-function-pointer-conversion
incompatible-object-pointer-conversion
C0278,  0232, 0233, 0244, 0268, 0278, 0321, 0322, 0338, 0422, 0423, 0426, 0427, 0429, 0430, 0431, 0432, 0435, 0436, 0437, 0446, 0447, 0448, 0449, 0451, 0452, 0453, 0454, 0456, 0457, 0458, 0460, 0461, 0462, 0463, 0466, 0467, 0468, 0469, 0476, 0477, 0478, 0481, 0482, 0483, 0484, 0485, 0486, 0487, 0493, 0494, 0495, 0496, 0513, 0514, 0515, 0536, 0537, 0540, 0541, 0542, 0546, 0547, 0550, 0554, 0555, 0556, 0557, 0558, 0559, 0560, 0561, 0562, 0563, 0564, 0565, 0580, 0588, 0589, 0590, 0591, 0605, 0616, 0619, 0620, 0621, 0622, 0627, 0628, 0629, 0631, 0638, 0640, 0641, 0642, 0643, 0644, 0645, 0646, 0649, 0650, 0651, 0653, 0655, 0656, 0657, 0659, 0664, 0665, 0669, 0671, 0673, 0674, 0675, 0677, 0682, 0683, 0684, 0685, 0690, 0698, 0699, 0708, 0709, 0736, 0737, 0738, 0746, 0747, 0755, 0756, 0757, 0758, 0766, 0767, 0768, 0774, 0775, 0801, 0802, 0803, 0804, 0811, 0821, 0834, 0835, 0844, 0845, 0851, 0852, 0866, 0873, 0877, 0940, 0941, 0943, 0944, 1023, 1024, 1025, 1033, 1047, 1048, 1050, 1061, 1062, 3236, 3237, 3238, 3244

assignment-to-non-modifiable-lvalue
cast-pointer-void-arithmetic-implicit
element-type-incomplete
function-pointer-integer-cast-implicit
function-return-type
inappropriate-pointer-cast-implicit

incompatible-function-returnpointer-typeconversion
inappropriateincompatible-object-pointer-cast-implicitconversion
initializer-excess
invalid-array-size
non-constant-static-assert
parameter-match-type
pointer-integral-cast-implicit
pointer-qualifier-cast-const-implicit
pointer-qualifier-cast-volatile-implicit
redeclaration
type-specifier
undeclared-parameter
incompatible-function-pointer-conversion
incompatible-object-pointer-conversion

return-empty
return-non-empty
static-assert
type-compatibility
type-compatibility-link
type-specifier
undeclared-parameter
unnamed-parameter

Tool

Version

Checker

Description

 Astrée
 

Include Page
Astrée_V
Astrée_V

alignas-extended
assignment-to-non-modifiable-lvalue
cast-pointer-void-arithmetic-implicit
element-type-incomplete
function-pointer-integer-cast-implicit
function-return-type
inappropriate-pointer-cast-implicit
incompatible-function-pointer-conversion
incompatible-object-pointer-conversion
initializer-excess
invalid-array-size
non-constant-static-assert
parameter-match-type
pointer-integral-cast-implicit
pointer-qualifier-cast-const-implicit
pointer-qualifier-cast-volatile-implicit
redeclaration

return-

empty

return-non-

empty

Partially checked

static-assert
type-compatibility
type-compatibility-link
type-specifier
undeclared-parameter
unnamed-parameter

Partially checked
Cppcheck Premium

Include Page
Cppcheck Premium_V
Cppcheck Premium_V

premium-cert-msc40-c
Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C0232, C0233, C0244, C0268,

C0321, C0322, C0338, C0422, C0423, C0426, C0427, C0429, C0430, C0431, C0432, C0435, C0436, C0437, C0446, C0447, C0448, C0449, C0451, C0452, C0453, C0454, C0456, C0457, C0458, C0460, C0461, C0462, C0463, C0466, C0467, C0468, C0469, C0476, C0477, C0478, C0481, C0482, C0483, C0484, C0485, C0486, C0487, C0493, C0494, C0495, C0496, C0497, C0513, C0514, C0515, C0536, C0537, C0540, C0541, C0542, C0546, C0547, C0550, C0554, C0555, C0556, C0557, C0558, C0559, C0560, C0561, C0562, C0563, C0564, C0565, C0580, C0588, C0589, C0590, C0591, C0605, C0616, C0619, C0620, C0621, C0622, C0627, C0628, C0629, C0631, C0638, C0640, C0641, C0642, C0643, C0644, C0645, C0646, C0649, C0650, C0651, C0653, C0655, C0656, C0657, C0659, C0664, C0665, C0669, C0671, C0673, C0674, C0675, C0677, C0682, C0683, C0684, C0685, C0690, C0698, C0699, C0708, C0709, C0736, C0737, C0738, C0746, C0747, C0755, C0756, C0757, C0758, C0766, C0767, C0768, C0774, C0775, C0801, C0802, C0803, C0804, C0811, C0821, C0834, C0835, C0844, C0845, C0851, C0852, C0866, C0873, C0877, C0940, C0941, C0943, C0944, C1023, C1024, C1025, C1033, C1047, C1048, C1050, C1061, C1062, C3236, C3237, C3238, C3244

C++4122


Klocwork
Include Page
Klocwork_V
Klocwork_V
MISRA.FUNC.STATIC.REDECL
 LDRA tool suite LDRA tool suite
 

Include Page
LDRA_V
LDRA_V

 21 S, 145 S, 323 S, 345 S, 387 S, 404 S, 481 S, 580 S, 612 S, 615 S, 646 S
Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_C-MSC40-a

An inline definition of a function with external linkage shall not contain definitions and uses of static objects

 Polyspace Bug Finder

 

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rule MSC40-CChecks for inline constraint not respected (rule partially covered) PRQA QA-C
Include Page
PRQA QA-C_vPRQA QA-C_v
RuleChecker

Include Page
RuleChecker_V
RuleChecker_V

alignas-extended
assignment-to-

PRQA QA-C++
Include Page
cplusplus:PRQA QA-C++_Vcplusplus:PRQA QA-C++_V 4122 RuleChecker
Include Page
RuleChecker_VRuleChecker_VPartially checked

Related Vulnerabilities

...