To reproduce the issue, try this as C code using ICC 19.0.1 in Compiler Explorer:

#ifdef __GNUC__
_Static_assert(__builtin_add_overflow_p (0x7fffffff, 1, 0), "");
#endif

Compiler output:

<source>(2): error: expression must be an integral constant expression
  _Static_assert(__builtin_add_overflow_p (0x7fffffff, 1, 0), "");
                 ^

<source>(2): error: function call is not allowed in a constant expression
  _Static_assert(__builtin_add_overflow_p (0x7fffffff, 1, 0), "");
                 ^

Reply via email to