3 ms·
clang does catch this: clang -Weverything uninit.c uninit.c:3:6: warning: no previous prototype for function 'foo' [-Wmissing-prototypes] void foo(int b
by plorkyeran 14y ago
clang does catch this:
clang -Weverything uninit.c
uninit.c:3:6: warning: no previous prototype for function 'foo' [-Wmissing-prototypes]
void foo(int bar) {
^
uninit.c:10:6: warning: variable 'lol' may be uninitialized when used here [-Wconditional-uninitialized]
if (lol == 7) {
^~~
uninit.c:4:9: note: initialize the variable 'lol' to silence this warning
int lol;
^
= 0
uninit.c:37:3: warning: no newline at end of file [-pedantic,-Wnewline-eof]
*/
^
3 warnings generated.
- rpearl 14y agoGlad to hear it--I've been looking into using clang more... This might just tip me towards it.