This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: [X-POST] Alignas broken when used with constexpr array data member for structure
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Alec Teal <a dot teal at warwick dot ac dot uk>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 9 Jan 2018 13:40:57 +0000
- Subject: Re: [X-POST] Alignas broken when used with constexpr array data member for structure
- Authentication-results: sourceware.org; auth=none
- References: <2182301d-14b8-287d-bf6b-d9ed22e34726@warwick.ac.uk> <072092be-4ac0-ec50-8696-1e1c6dc48733@warwick.ac.uk>
And I've now told you both on IRC and in reply to your original email,
the directory is gcc/cp
On 9 January 2018 at 13:39, Alec Teal <a.teal@warwick.ac.uk> wrote:
> Per recommendation asking on GCC help
>
>
>
> -------- Forwarded Message --------
> Subject: Alignas broken when used with constexpr array data member
> for structure
> Date: Tue, 9 Jan 2018 13:15:37 +0000
> From: Alec Teal <a.teal@warwick.ac.uk>
> To: gcc@gcc.gnu.org <gcc@gcc.gnu.org>
>
>
>
> [This sender failed our fraud detection checks and may not be who they
> appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]
>
>
> 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 alignas
>
> This is a pretty nasty bug and means it's not implemented as I thought.
> I don't know the front-ends (but I do actually know GIMPLE-low and below
> quite well, love the pattern matching) and I'd like to dig more, it's
> almost certainly fixed - this is just for personal curiosity.
>
> Where would I look? A 1 line reply with a directory would be a great
> start; even if it's just a guess.
>
> I did ask in #gcc on freenode - it didn't go so well, sorry to ping you
> all for this.
>
>
> Alec
>