https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71592

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You can't use such static_assert this way in C++, unless the function is
constexpr, nor in C (always), so guess you are proposing something completely
different (like, if this function/subroutine is inlined and the expression is
after inlining/optimizations constant, then see if it is true or false,
otherwise do nothing.  So more like
if (__builtin_constant_p (r >= 0.0))
  {
    if (!(r >= 0.0)) __builtin_warning ("...");
  }
Also, !$ already has a specific meaning in OpenMP, so it would be a bad idea to
abuse it.

Reply via email to