[cfe-dev] Comparison of distinct pointer types

Keith Bauer onesadcookie at gmail.com
Sat Aug 25 18:37:53 PDT 2007


More bugs (should I be making bugzillas for these instead of spamming the list?)

int equal(char *a, const char *b)
{
    return a == b;
}
imac:Desktop keith$ gcc -Wall -W -Wno-unused-parameter -Werror test5.c
-fsyntax-only
imac:Desktop keith$ clang -fsyntax-only test5.c
test5.c:3:14: warning: comparison of distinct pointer types ('char *'
and 'char const *')
    return a == b;
           ~ ^  ~
1 diagnostic generated.



More information about the cfe-dev mailing list