kees wrote:

@JustinStitt were looking over things, and I stumbled over something here...

> Thanks. So IIUC, the rule is:
> 
> 1. If the type of either operand of an arithmetic operator is `__ob_trap`,  
> the operator traps on overflow, and the result type is `__ob_trap`.

This is correct and what I was expecting.

> 2. If either the operand type or the destination type of an integer 
> conversion is `__ob_trap`, the conversion traps on overflow.

This one, however, I think it not what we want, but I may be missing something.

```
int __ob_trap src = bigger_than_255;
...
char dest = src;
```

I don't think we want a trap on the `dest` assignment, since it isn't 
`__ob_trap`. It doesn't care about the truncation. This is a "sided" operation, 
unlike the arithmetic.


https://github.com/llvm/llvm-project/pull/148914
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to