Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Although the standard does not require narrowing return expressions of the same type as the function, it does not clearly state what is allowed. Is it allowed to narrow the result? Is it allowed to narrow the result sometimes but not always? Is it allowed to partially narrow the result (for example, if the application binary interface [ABI] returns floats in double format, but a float function has a float return expression evaluated to wider than double)? An aggressive implementation could argue yes€ yes€ to all these questions, though the resulting behavior would complicate debugging and error analysis.

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

FLP07-C

Low

Probable

Medium

P4

L3

Automated Detection

Tool

Version

Checker

Description

Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-FLP07
Klocwork

Include Page
Klocwork_V
Klocwork_V

CERT.RTN.FLT.CAST.DBL
CERT.RTN.FLT.IMPLICIT.CAST.DBL

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...