Closed
Description
Affected rules
RULE-1-3
Description
The detection of standard-compliant main functions is broken:
- Does not consider the valid use of typedefs.
- Does not support the use of arrays instead of pointers for argv
- Definition of the no-arg main is wrong - currently specified the return type should be
void
, when it should beint
, and it should enforce that void is specified in the parameter list to declare no arguments.
Example
int main() { // NON_COMPLIANT[FALSE_NEGATIVE]
}
int main(int argc, char * argv[]) { // COMPLIANT[FALSE_POSITIVE]
}