[cfe-dev] No implicit conversion from 0 to pointer type

Keith Bauer onesadcookie at gmail.com
Sat Aug 25 18:07:17 PDT 2007

Chris said to email the list about this:


void *foo(void) { return 0; }


clang -fsyntax-only test.c
test.c:1:19: warning: incompatible type returning 'int', expected 'void *'
void *foo(void) { return 0; }
                  ^      ~
1 diagnostic generated.

incorrectly -- zero should be implicitly convertable to void*.


More information about the cfe-dev mailing list