Hello Manuel, Let's CC Gaby on this one as well.
Manuel López-Ibáñez <lopeziba...@gmail.com> writes: > The problem is that the macro unwinder code is changing the original > diagnostic type and not restoring it, so the code detecting that we > ICE fails to abort, which triggers another ICE, and so on. But there > is no point in modifying the original diagnostic, we can simply create > a temporary copy and use that for macro unwinding. We modify the context as well, and we set it back to its original value before getting out. Why not just doing the same for the diagnostic_info type? I mean, just save diagnostics->kind before changing it, and set it back to the saved value before getting out? That is less expensive than copying all of the diagnostic_info. I don't intent to fight either way, but I'd be more inclined to just setting the initial value back. If the maintainers think otherwise, I'll abide. > Dodji, does it look ok? I am not sure how much testsuite coverage we > have for the macro unwinder, so I hope I didn't mess it up in some > non-trivial testcase. The test cases for the unwinder are not really tight. They are mainly gcc.dg/cpp/macro-exp-tracking-{1,2,3}.c, AFAICT. Also, the patch does some cleanup. Maybe it'd be best to post the cleanup by removing a useless variable and hoisting some variable accesses; maybe that cleanup in a separate patch that would be committed at the same time? Thank you for your time. -- Dodji