Versions Compared

Key

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

...

The LDRA tool suite V 7.6.0 is able to can detect violations of this rule.

Fortify SCA Version 5.0 is able to can detect violations when an array is declared in a function and then a pointer to that array is returned.

Splint Version 3.1.1 can detect violations of this rule.

Compass/ROSE automatically detects returning pointers to local variables. Detecting more general cases, such as examples where static pointers are set to local variables which then go out of scope would be difficult.

...