I'm getting a ton of invalid warnings from ICC about an __assume with side effects. It turns out the "problem" is that I'm using a statement expr (which has no side effects). Here is a reduced test case:
#include <stdint.h> void foo(int *bar) { __assume(( ((uintptr_t) bar) % 16) == 0); __assume(( (__extension__ ({ (uintptr_t) bar; })) % 16) == 0); }
Which triggers:
aa.c(8): warning #2261: __assume expression with side effects discarded __assume(( ^
I've already tweaked my code to get rid of the statement expr, so no need to think of work-arounds on my behalf. I just wanted to report the issue.