While looking on some legacy code, I found a rather unusual construction (for me at least):
#define loop(i,start,stop) for((i)=(start);(i)<(stop);(i)++)
This macro is then used everywhere instead of regular for loops construction.
I think it’s a bad idea in general because it does not really solve a problem nor simplify anything, but can it be dangerous?
By dangerous I mean breaking compilation (best case) or (much worse but more interesting) do something else than expected.
The standard cautionary tale against macros is arguments with side effects: