This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libstdc++: Fix libstdc++/67440: pretty-printing of a const set<foo> fails


On 25 November 2015 at 17:29, Alan Lawrence <alan.lawrence@arm.com> wrote:
> On 16/11/15 21:04, Doug Evans wrote:
>>
>> Hi.
>>
>> Apologies for the delay.
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67440
>>
>> Tested with current trunk.
>>
>> 2015-11-16  Doug Evans  <dje@google.com>
>>
>>      PR libstdc++/67440
>>      * python/libstdcxx/v6/printers.py (find_type): Handle "const" in
>>      type name.
>>      * testsuite/libstdc++-prettyprinters/debug.cc: Add test for
>>      const set<int>.
>>      * testsuite/libstdc++-prettyprinters/simple.cc: Ditto.
>>      * testsuite/libstdc++-prettyprinters/simple11.cc: Ditto.
>
>
> On gcc-5-branch, the debug.cc and simple.cc tests don't seem to compile, on
> either x86_64-none-linux-gnu or aarch64-none-linux-gnu. I get errors like:
>
> /work/alalaw01/src/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc:
> In function 'int main()':
> /work/alalaw01/src/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc:77:43:
> error: in C++98 'const_intset' must be initialized by constructor, not by
> '{...}'
>    const std::set<int> const_intset = {2, 3};
>                                            ^

Which should have failed to compile on trunk as well, but we're
missing a -std=gnu++98 in the simple.cc testcase, so on trunk it uses
the -std=gnu++14 default. I'll add -std=gnu++98 to the test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]