Looking at some kind of legacy code, I found a rather unusual construct (at least for me):
#define loop(i,start,stop) for((i)=(start);(i)<(stop);(i)++)
This macro is used everywhere, not a regular construct for .
I think this is a bad idea in general, because it really does not solve the problem and does not simplify anything, but can it be dangerous ? For dangerous ones, I mean breaking the compilation (the best case) or (which is much worse, but more interesting) to do something else than expected.
source share