bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fixed tests build on EDG-based compilers


From: Илья Курдюков
Subject: Re: [PATCH] Fixed tests build on EDG-based compilers
Date: Mon, 6 Dec 2021 16:03:29 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

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

[Prev in Thread] Current Thread [Next in Thread]