aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/test-suite
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-03-31 21:46:59 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-22 07:25:43 +0200
commit04c3c1e16a2bfcf9231c52d37611f05741056e6a (patch)
tree93476f8b7c3cae65766d2378e302898e0b197256 /validation/test-suite
parentcfca7b4c6cb48283cb554fc91dc859ff669f2547 (diff)
downloadsparse-dev-04c3c1e16a2bfcf9231c52d37611f05741056e6a.tar.gz
warn on all missing parameter types
A warning is given for K&R parameters without type declaration and these parameters are given an implicit type of int to avoid several problems with false errors in the next stages. However, this is only done for K&R functions with the optional parameter type declarations. If the parameters has no type declaration at all, no diagnostic is given and the type is left as incomplete. In consequence, a function defined with a typo like 'int foo(oid)' instead of 'int foo(void)' is left undetected (even with -Wold-style-definition and -Wstrict-prototypes enabled). Fix this by: 1) adding the type check to declare_argument() so that all parameters have a real type. 2) downgrade the diagnostic to a warning for K&R functions. Fixes: 6f7aa5e84dacec8e27a8d70090bba26a1a1276de Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/test-suite')
0 files changed, 0 insertions, 0 deletions