printf typechecking -- invalid conversion '%p

Also at Chris' request:

imac:Desktop keith$ cat > test4.c
int printf(const char *fmt, ...);

void foo(void *p) {
    printf("%p\n", p);
}
imac:Desktop keith$ clang -fsyntax-only test4.c
test4.c:4:13: warning: invalid conversion '%p
'
    printf("%p\n", p);
    ~~~~~~ ^
1 diagnostic generated.

-Keith

test4.c:4:13: warning: invalid conversion '%p
'
    printf("%p\n", p);
    ~~~~~~ ^

The attached patch appears to be all that's needed for this, currently.

Fixes the generation of the diagnostic, but not the random extra
newline in it :wink:

-Keith

%p.diff (369 Bytes)

test4.c:4:13: warning: invalid conversion '%p
'
    printf("%p\n", p);
    ~~~~~~ ^

The attached patch appears to be all that's needed for this, currently.

Thanks! Applied.

Fixes the generation of the diagnostic, but not the random extra
newline in it :wink:

I took care of this.

-Chris