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
C and C++


PARSE.NONSTD.II : Nonstandard Implicit Integer

Summary

[C++ only] A type specifier is missing in one of the following situations, but your compiler does not treat this as an error.

This includes the following situations.

If your native compiler treats these as errors, Missing Type Specifier or Missing Declaration Specifiers warnings will be issued instead.

This warning class is derived from a C/C++ parser warning.

Properties

Class Name Nonstandard Implicit Integer
Significance style
Mnemonic PARSE.NONSTD.II
Categories
MisraC2025 MisraC2025:8.1 Types shall be explicitly specified
MisraC2023 MisraC2023:8.1 Types shall be explicitly specified
Misra2012 Misra2012:8.1 Types shall be explicitly specified
Misra2004 Misra2004:8.2 Whenever an object or function is declared or defined, its type shall be explicitly stated
CERT-C CERT-C:DCL07-C Include the appropriate type information in function declarators
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="Nonstandard Implicit Integer"
To disable checks for this warning class, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Nonstandard Implicit Integer"

Example

extern e1;          /* Nonstandard Implicit Integer warning issued here if your compiler accepts implicitly-typed objects,
                     * 'Missing Type Specifier' warning issued if it does not
                     */

global1;                                 /* 'Missing Declaration Specifiers' warning issued here */

main(int argc, char *argv[]);            /* 'Implicit int on main' warning issued here: special case for main() */

f1(void);           /* Nonstandard Implicit Integer warning issued here if your compiler accepts functions with implicit return type,
                     * 'Missing Type Specifier' or 'Missing Declaration Specifiers' warning issued if it does not
                     * (depending on whether or not the compiler requires an explicit storage class specifier here)
                     */

f2(void){return 1;} /* Nonstandard Implicit Integer warning issued here if your compiler accepts functions with implicit return type,
                     * 'Missing Type Specifier' or 'Missing Declaration Specifiers' warning issued if it does not
                     * (depending on whether or not the compiler requires an explicit storage class specifier here)
                     */

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.

 

To report problems with this documentation, please visit https://support.codesecure.com/.