[google] Work around PR52796 by replacing empty packs with explicit overloads. (issue5971053)

Diego Novillo dnovillo@google.com
Sun Apr 1 16:38:00 GMT 2012


On 3/30/12 9:55 PM, Jeffrey Yasskin wrote:
> Work around http://gcc.gnu.org/PR52796 in gcc-4.6 by adding an
> overload of each function that passes a parameter pack directly as the
> only arguments of an object's constructor, which explicitly takes no
> arguments in place of the pack.
>
> Tested with check-c++ and by trying to provoke the bug in valgrind for
> each changed location.  Some of the insert_aux locations appear
> inaccessible because of missing emplace() functions.
>
> I plan to only apply this to the google/gcc-4_6 branch, since gcc-4.7
> already makes these cases work properly.
>
> 2012-03-30   Jeffrey Yasskin<jyasskin@google.com>
>
> 	* libstdc++-v3/include/ext/pool_allocator.h: Add 1-argument construct() method.
> 	* libstdc++-v3/include/ext/bitmap_allocator.h: Likewise.
> 	* libstdc++-v3/include/ext/new_allocator.h: Likewise.
> 	* libstdc++-v3/include/ext/malloc_allocator.h: Likewise.
> 	* libstdc++-v3/include/ext/array_allocator.h: Likewise.
> 	* libstdc++-v3/include/ext/mt_allocator.h: Likewise.
> 	* libstdc++-v3/include/ext/extptr_allocator.h: Likewise.
> 	* libstdc++-v3/include/bits/stl_construct.h:Add 1-argument _Construct function.
> 	* libstdc++-v3/include/bits/stl_list.h: Add default _List_node constructor.
> 	* libstdc++-v3/include/bits/hashtable_policy.h: Add default _Hash_node constructor.
> 	* libstdc++-v3/include/bits/forward_list.h:Add default _Fwd_list_node constructor.
> 	* libstdc++-v3/include/bits/stl_tree.h:Add default _Rb_tree_node constructor.
> 	* libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc: Update line numbers.
> 	* libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc: Likewise.
> 	* libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc: Likewise.
> 	* libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc: Likewise.
> 	* libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Likewise.
> 	* libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Likewise.
> 	* libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Likewise.
> 	* libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Likewise.

This is OK for google/gcc-4_6.

I'm not sure it makes sense to propose it for gcc-4_6-branch. 
Jason/Ben, any opinions on PR 52796 and what should we do for 
gcc-4_6-branch?


Thanks.  Diego.



More information about the Gcc-patches mailing list