在 2020/11/5 下午4:11, gmail Vladimir Koković 写道:
> Hi,
> 
> After a sleepless night the morning wit is something completely different, so 
> the analysis is now
> also different!
> 
> I made a new simpler test example and the situation is as follows:
> 1. .cpp and .ii have two successive code blocks "__try1 (_catchVK)"
> 2. .s only has the first code block "__try1 (_catchVK)"
> 3. .o does not have a block code for "__try1 (_catchVK)" at all and the 
> second block code is also
> missing!
> 
> 


```c++
  try {
    __try1(_catchVK)
    signal(SIGFPE, SIG_DFL);
    int x, y = 0;
    x = 5 / y;
    __except1
    return;
  } catch (SEH_EXCEPTION_RECORD_CLASS & seh) {
```

The C++ compiler may assume that this sequence of statements cannot throw any 
C++ exceptions (it's
undefined behavior to divide an integer by zero), so the `catch` block is 
unreachable, as well as
anything following `return`, and no code is generated consequently.

You would probably be interested in the `-fnon-call-exceptions` option.


-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to