Re: Alignas broken when used with constexpr array data member for structure

2018-01-09 Thread Jonathan Wakely
On 9 January 2018 at 13:15, Alec Teal wrote: > Hi there, > > In GCC 4.8.4 I have something like the following: > > constexpr int x = 5; > > constexpr int y = 4; > > struct alignas(y) my_data_block { > >char data[x]; > > }; > > > And it causes some weird errors to the

Alignas broken when used with constexpr array data member for structure

2018-01-09 Thread Alec Teal
Hi there, In GCC 4.8.4 I have something like the following: constexpr int x = 5; constexpr int y = 4; struct alignas(y) my_data_block {    char data[x]; }; And it causes some weird errors to the tune of "size of array ‘data’ is not an integral constant-expression" in the presence of the