Wouldn't it be wise if the compiler (or preprocessor) issued at least a warning if you redefine language keywords ? :) So I just pasted this into a C++ file I was working on and it compiled without a single warning: #define struct union #define if while #define else #define break #define double float #define volatile // this one is cool I mean, redefining language keywords is not a thing I do every day and I guess mo…
My c++ isn't so good that I understand that first one, but if->while and break->"" can introduce infinite loops, else->"" will break logic (and possibly hit null pointers), double->float will cause subtle rounding errors in numeric computation, and volatile->"" will break multi-threaded apps unpredictably.
It's evil, subtle code breakage that because of the macro (in an included header far far away) leave the code looking perfectly ordinary.