This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [09/nn] Add a fixed_size_mode_pod class
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 26 Oct 2017 20:42:34 +0100
- Subject: Re: [09/nn] Add a fixed_size_mode_pod class
- Authentication-results: sourceware.org; auth=none
- References: <87wp3mxgir.fsf@linaro.org> <87tvyqw1ki.fsf@linaro.org> <CAFiYyc2HVnJSurbSk=_4hwmg__hdkq_7EQfk1PFwP8AtFxv3Gg@mail.gmail.com> <87y3ny14rf.fsf@linaro.org> <CAFiYyc35qW0WyLEPgPy4Z7SdFZXqB=mjU=wATv=qNZfNwtV18w@mail.gmail.com>
Richard Biener <richard.guenther@gmail.com> writes:
> On Thu, Oct 26, 2017 at 2:18 PM, Richard Sandiford
> <richard.sandiford@linaro.org> wrote:
>> Richard Biener <richard.guenther@gmail.com> writes:
>>> On Mon, Oct 23, 2017 at 1:22 PM, Richard Sandiford
>>> <richard.sandiford@linaro.org> wrote:
>>>> This patch adds a POD version of fixed_size_mode. The only current use
>>>> is for storing the __builtin_apply and __builtin_result register modes,
>>>> which were made fixed_size_modes by the previous patch.
>>>
>>> Bah - can we update our host compiler to C++11/14 please ...?
>>> (maybe requiring that build with GCC 4.8 as host compiler works,
>>> GCC 4.3 has -std=c++0x, but I'm quite sure that's not enough).
>>
>> That'd be great :-) It would avoid all the poly_int_pod stuff too,
>> and allow some clean-up of wide-int.h.
>
> Can you figure what oldest GCC release supports the C++11/14 POD handling
> that would be required?
Looks like GCC 4.7, which was also the first to support -std=c++11
as an option. I could bootstrap with that (after s/std=gnu..98/std=c++11/
in configure) without all the POD types. It also supports "= default"
and template using, which would get rid of some wide-int.h ugliness.
Being able to construct poly_int::coeffs directly might also allow
some optimisations, and should help avoid the POLY_SET_COEFF bug that
Martin found, but I haven't looked at that yet.
Thanks,
Richard