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 |
Two functions with the same type signature but different exception specifications are treated by the compiler as having the same type.
In general, warnings of this class will only occur for C++ code compiled as C++14 or earlier. C++17 and later do not permit two such functions to be treated as having the same type, so you will usually encounter a compiler error instead.
See also Incompatible Exception Specification.
This warning class is derived from a C/C++ parser warning.
| Class Name | Incompatible Exception Specifications |
|---|---|
| Significance | style |
| Mnemonic | PARSE.INCOMPATIBLE.EXCSPECS |
| Categories | None |
| Availability | Available for C++ only (not 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="Incompatible Exception Specifications" WARNING_FILTER += discard class="Incompatible Exception Specifications" |
void f1() noexcept;
void f2();
template <typename T> void tplt_fn(T &r, T &q){}
void (*myfptr)(void) noexcept;
void parse_incompatible_excspecs(void) {
myfptr = f2; // 'Incompatible Exception Specifications' warning issued here for C++14 and earlier
// (generally a parse error for C++17 and later)
tplt_fn(f1, f2); // 'Incompatible Exception Specifications' warning issued here for C++14 and earlier
// (generally a parse error for C++17 and later)
}
The following configuration file parameters affect checks for this warning class.
To report problems with this documentation, please visit https://support.codesecure.com/.