Open llvmbot opened 5 years ago
Executed on Godbolt's linux version doesn't seem to reproduce the reported issue:
I took your example, compiled it for linux, generated assembly, and we don't generate any calls to abort.
It is possible that we generate an incorrect LSDA, and therefore the EH runtime aborts. Unfortunately, my Linux machine is not online at the moment, so I can't actually execute your code to try to reproduce.
Extended Description
It seems that the code in a macro, such as this;
...will be stripped out of existence, for reasons unknown. Even under pedantic mode, passing a cc* to N will fail to trigger a warning or error, as it apparently "doesn't even exist".
'F;' will occur still however, but any throw's within will compile as abort(0)'s, even if the macro itself resides inside a parent try-catch. If the F; is replaced with a simple throw; the entire macro seems to vanish entirely...
A crude example source is attached, that tests each general try-catch case before the macro-generated one. All behaves as expected when jumping through the debugger, until you get to the macro where it simply abort's...