C semantics changed
Yeah, I lost a full afternoon to find a bug that wasn't a bug but a change on how C handles NULL pointers. Basically, I was printing a NULL pointer, something you can test with a simple program like:
#include <stdio.h>
void main(void) {
char *f = NULL;
printf("%s\n", f);
}
Now... what should this code do? If you ask me before my war with C, I would say: it gives a nice segmentation fault. And in fact, it does, but for gcc 4.1.x. If you try with gcc 4.0.x or gcc 3.x, it prints "(null)". Now, when you suppose to have a string with "(null)" but you have not, and on some systems to print it really prints "(null)", can give you a big headache.
Leave a comment