According to the C Standard, 7.2123.3, paragraph 6 [ISO/IEC 9899:20112024],
The address of the
FILE
object used to control a stream may be significant; a copy of aFILE
object need is not required to serve in place of the original.
...
Tool | Version | Checker | Description | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Astrée |
| file-dereference | Partially checked | |||||||||||||||||
Axivion Bauhaus Suite |
| CertC-FIO38 | Fully implemented | |||||||||||||||||
Clang |
| misc-non-copyable-objects | Checked with clang-tidy | |||||||||||||||||
Compass/ROSE | Can detect simple violations of this rule | |||||||||||||||||||
Coverity |
| MISRA C 2012 Rule 22.5 | Partially implemented | |||||||||||||||||
Cppcheck Premium |
| premium-cert-fio38-c | Fully implemented | |||||||||||||||||
Helix QAC |
| C1485, C5028 C++3113, C++3114 | ||||||||||||||||||
Klocwork |
| MISRA.FILE_PTR.DEREF.2012 | ||||||||||||||||||
LDRA tool suite |
| 591 S | Fully implemented | |||||||||||||||||
Parasoft C/C++test |
| CERT_C-FIO38-a | A pointer to a FILE object shall not be dereferenced | |||||||||||||||||
PC-lint Plus |
| Polyspace Bug Finder
| Polyspace Bug Finder
| Misuse of 9047 | Partially supported: reports when a FILE | objectpointer is dereferenced | ||||||||||||||
| CERT C: Rule FIO38-C | Checks for misuse of a FILE object (rule fully covered) | Use of copy of FILE object | PRQA QA-C | ||||||||||||||||
Include Page | PRQA QA-C_v | PRQA QA-C_v | 1485, 5028 | PRQA QA-C++ | Include Page | | cplusplus:PRQA QA-C++_V | cplusplus:PRQA QA-C++_V | 5013||||||||||||
RuleChecker |
| file-dereference | Partially checked |
...
Bibliography
[ISO/IEC 9899:20112024] | 7.2123.3, "Files" |
...