ret-void: warn for implicit type
commit7120da3d4f0428876fe6aea16d7d24e80196f684
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Mon, 1 May 2017 16:29:51 +0000 (1 18:29 +0200)
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Thu, 8 Jun 2017 01:38:56 +0000 (8 03:38 +0200)
treee27babc7e357adf843d50b192672a0ca69c46c13
parent999b976d2c1e6fa9e9c0236d7f2e23237d95864c
ret-void: warn for implicit type

Currently, no warning is given for symbols for which no
type is explicitely given. But for functions we received
a pointless warning like here under if the returned type
is effectively an int:
warning: incorrect type in return expression (invalid types)
    expected incomplete type
    got int

Fix this by issuing the warning.
Also give an implicit type of int, as required by C89, to
avoid pointless warning about the expected incomplete type.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
parse.c
validation/alias-mixed.c
validation/badtype2.c
validation/implicit-ret-type.c [new file with mode: 0644]
validation/implicit-type.c [new file with mode: 0644]
validation/typedef_shadow.c