bwendling wrote:

> Forbidding usage in C++ probably avoids the worst of the canonical-type 
> issues, but there's still some potential for weird results. Particularly with 
> type merging; for example, if you write `a ? (wrap_int)x : 1`, is the result 
> a wrapping type?

I had a similar question in the general case: is the annotation contagious?

```
int foo(wrap_int x, int a, int b, int c) {
  if (x + a + b < c)
    return 0;
  return 1;
}
```

The `x + a` is checked, but is that result checked when added to `b`?

https://github.com/llvm/llvm-project/pull/86618
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to