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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Amanieu d'Antras from comment #2)
> int array[__atomic_always_lock_free(sizeof(int), 0)];
> 
> test.c:1:5: error: variably modified ‘array’ at file scope

I think it should be fine to reject this one - the array size is not an integer
constant expression.  While the first argument of _Static_assert also has to be
an integer constant expression, I thought we could permit some latitude here; 
the _Static_assert (__atomic_always_lock_free (sizeof (int), 0), "foo"); line
looks quite reasonable to me...

Reply via email to