kees wrote:
> FWIW, this _currently_ 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.
> ```
Ah, right, forgot that bit, but the rest stands. To replace this example, I'd
say, what happens with:
```
int __ob_trap big = runtime_1024;
...
char __ob_wrap byte = (char __ob_wrap)big; // is this supposed to wrap or trap?
I say wrap we're casting to match "byte"'s behavior
```
https://github.com/llvm/llvm-project/pull/148914
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits