Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Dunno about explanation, but experiment shows it to work at least with two preprocessors - Microsoft's and GCC:

First make a file a.c that has in it:

#define true false

#define false true

int A = true;

int B = false;

then from the command line, do (with the Microsoft compiler): D:\>cl -E a.c

int A = true;

int B = false;

Now with gcc (I'm using cygwin's gcc): D:\>sh -c "gcc -E a.c"

int A = true;

int B = false;

I've stripped the other stuff.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: