JustinStitt wrote:
@kees
> If we don't follow what I'm describing, this becomes meaningless:
>
> ```
> int __ob_trap big = runtime_1024;
> ...
> char __ob_wrap byte = big; // is this supposed to wrap or trap? I say wrap --
> we're describing how "byte" behaves
> ```
>
> How can we perform an assignment where we _want_ a wrapping behavior if
> suddenly `ob_trap` dominates even from the RHS?
FWIW, this doesn't compile
```c
$ cat test.c
void foo(int some) {
int __ob_trap big = some;
char __ob_wrap byte = big; // is this supposed to wrap or trap? I say wrap --
we're describing how "byte" behaves
}
$ clang test.c -foverflow-behavior-types -fsyntax-only
test.c:3:18: error: cannot assign between incompatible overflow behavior types
('__ob_wrap' and '__ob_trap')
3 | char __ob_wrap byte = big; // is this supposed to wrap or trap? I say
wrap -- we're describing how "byte" behaves
| ^
1 error generated.
```
https://github.com/llvm/llvm-project/pull/148914
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits