#include typedef long int int64; int main(void) { int *myextra; /* with explicit casting */ myextra = (int *) malloc(sizeof (int)); free(myextra); /* with no explicit casting */ myextra = malloc(sizeof (int)); free(myextra); /* myextra now becomes int64 */ { int64 *myextra; /* with explicit casting */ myextra = (int *) malloc(sizeof (int)); /* [1], [2]. and [3] warn here */ free(myextra); /* with no explicit casting */ myextra = malloc(sizeof (int)); /* Only [3] warns here */ free(myextra); } return 0; } /* 1: gcc 4.8.2: gcc -Wall -Wextra -std=c89 -pedantic /tmp/test.c 2: clang 3.5.0: clang -Weverything -Wno-shadow -std=c89 -pedantic /tmp/test.c 3: clang 3.5.0: clang --analyze /tmp/test.c */