Sensible folding for c/c++