JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
An occurrence of a deprecated entity.
For the sake of this warning class, a deprecated entity is an entity for which one of the following is true.
Note in particuar that if an entity is deprecated in a particular version of the applicable standard but is not treated as deprecated by your compiler, you will not see warnings of this class unless user code or an imported library explicitly indicates that the entity is deprecated.
This warning class is derived from a C/C++ parser warning.
| Class Name | Deprecated Entity | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Significance | style | ||||||||||||
| Mnemonic | PARSE.DE | ||||||||||||
| Categories |
|
||||||||||||
| Availability | Available for C and C++. |
||||||||||||
| Enabling | Checks for this warning class are enabled by default.
However, warning instances of this class that are issued as parser
errors (rather than parser warnings)
will be discarded
when using factory configuration settings.
To prevent these instances from being discarded, add the
following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Deprecated Entity" WARNING_FILTER += discard class="Deprecated Entity" |
/* PARSE.DE.c */ #include <stdio.h> char *gets(char *s); void f(void){ char name[20]; printf("What is your name?"); gets(name); /* 'Deprecated Entity' warning issued here for all C versions * ('Use of gets' warning also issued) */ printf("Hello %s\n", name); }
// PARSE.DE.cpp #include <functional> #include <memory> #if __cplusplus >= 201402L [[deprecated]] void f(void); void call_user_deprecated_fn(void){ f(); // 'Deprecated Entity' warning issued here for C++14 and later // - function f() has [[deprecated]] attribute (introduced in C++14) } #endif void parse_de(void) { std::auto_ptr<int> iptr(new int(10)); std::auto_ptr<int> iptr2(new int(10)); // 'Deprecated Entity' warning issued here for C++11 and later // - std::auto_ptr deprecated in language standard std::unary_function<int, bool> uf; // 'Deprecated Entity' warning issued here for C++11 and later // - std::unary_function deprecated in language standard // ... remainder of function }
The following configuration file parameters affect checks for this warning class.
To report problems with this documentation, please visit https://support.codesecure.com/.