Versions Compared

Key

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

...

produces, on a Linux machine running g++ 4.3:

Code Block

Before setjmp(): Instances: 0
func(): Instances: 1
From longjmp(): Instances: 1
After longjmp(): Instances: 1

...

On the same platform (Linux, g++ 4.3), this code produces:

Code Block

Before try: Instances: 0
func(): Instances: 1
In catch: Instances: 0
After catch: Instances: 0

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

ERR34-CPP

low

probable

medium

P4

L3

Automated Detection

Tool

Version

Checker

Description

 PRQA QA-C++

 
Include Page
PRQA QA-C++_v
PRQA QA-C++_v

Secondary Analysis

 

Bibliography

[ISO/IEC 14882-2003] Section 18.7
[Henricson 97] Rule 13.3 Do not use setjmp() and longjmp().

...

ERR33-CPP. Destructors must not throw exceptions      12012. Exceptions and Error Handling (ERR)      ERR35-CPP. A handler in a constructor or destructor's function-try-block should not reference class data