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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The problem is rather __builtin_constant_p not resolving to a constant. This is
a dup of bug 79482.
As shown by:
#include <stdint.h>

uint16_t f1(void);

#define ASSERT_ON_COMPILE_SELECTOR_SIZE(e)                                \
        _Static_assert(__builtin_constant_p(e) ? ((f1()) >> 16) == 0 : \
                       (sizeof(f1()) <= 2), "problem")

int f(uint16_t tr)
{
        ASSERT_ON_COMPILE_SELECTOR_SIZE(tr);
        return 0;
}

*** This bug has been marked as a duplicate of bug 79482 ***

Reply via email to