This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] [libstdc++] [constexpr] use macros in place of 'constexpr' to allow for disabling constexpr until fully supported by compiler
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Cc: Marc Glisse <marc dot glisse at inria dot fr>, Paolo Carlini <paolo dot carlini at oracle dot com>, dev dot lists at jessamine dot co dot uk, gcc-patches at gcc dot gnu dot org, Jason Merrill <jason at redhat dot com>
- Date: Thu, 17 Feb 2011 19:32:56 +0000
- Subject: Re: [Patch] [libstdc++] [constexpr] use macros in place of 'constexpr' to allow for disabling constexpr until fully supported by compiler
- References: <3f47a1ba92b11724c7daafd3f4c15e75.squirrel@webmail.plus.net> <4D5D48A9.7020001@oracle.com> <AANLkTimP6W8r6DmZ_DnpcJCKH_yKNKvw8aYkOWGF1r+z@mail.gmail.com> <alpine.DEB.2.02.1102171958290.2488@laptop-mg.saclay.inria.fr>
On 17 February 2011 19:02, Marc Glisse wrote:
> On Thu, 17 Feb 2011, Jonathan Wakely wrote:
>
>> On 17 February 2011 16:11, Paolo Carlini wrote:
>>>
>>> On 02/17/2011 03:06 PM, Adam Butcher wrote:
>>>>
>>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46472
>
> [...]
>>
>> I don't much like the idea of patching the library and having to ship
>> those changes in 4.6.0 to workaround that bug (I think the two PRs are
>> the same issue.) ?Especially as neither of those PRs shows code which
>> is affected by using constexpr in the library (I'm sure such code
>> exists, but the testcases provided don't show a library-related
>> problem.)
>
> Er, the one cited above shows an error with:
> std::array<std::pair<int,int>,2> myvar;
I beg to differ. It shows code that certainly looks as though it was
derived from that, but I get no error for
#include <utility>
#include <array>
std::array<std::pair<int,int>,2> myvar;
Maybe the library has been changed to avoid the error since you
submitted the PR, but that's even more reason not to patch the
library.
I repeat the request for a testcase using libstdc++ which passed with
4.5 and fails with 4.6