On 8/17/20 4:37 PM, Bruno Haible wrote:
+   Avoid Clang’s __builtin_assume, as clang 9.0.1 -Wassume can
+   generate a bogus diagnostic "the argument to '__builtin_assume' has
+   side effects that will be discarded" even when the argument has no
+   side effects.  */
Do you have a test case, that we could check on clang 10 and on future
clang versions?

Here's a short test that elicits the bogus warning for me now.

static int f (int x) { return x; }
int main (void) { __builtin_assume (f (1)); return 0; }

Reply via email to