This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/65352] array<T,0>::begin()/end() etc. forms a null reference and breaks on clang+ubsan
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 May 2015 16:28:28 +0000
- Subject: [Bug libstdc++/65352] array<T,0>::begin()/end() etc. forms a null reference and breaks on clang+ubsan
- Auto-submitted: auto-generated
- References: <bug-65352-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65352
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu May 28 16:27:56 2015
New Revision: 223842
URL: https://gcc.gnu.org/viewcvs?rev=223842&root=gcc&view=rev
Log:
PR libstdc++/65352
* include/profile/array (array::data): Use __array_traits::_S_ptr.
* include/debug/array (array::data): Likewise.
* include/std/array (__array_traits::_S_ptr): New function.
(array::data): Use _S_ptr to avoid creating invalid reference.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
dg-error line numbers.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
likewise.
Modified:
branches/gcc-4_9-branch/libstdc++-v3/ChangeLog
branches/gcc-4_9-branch/libstdc++-v3/include/debug/array
branches/gcc-4_9-branch/libstdc++-v3/include/profile/array
branches/gcc-4_9-branch/libstdc++-v3/include/std/array
branches/gcc-4_9-branch/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
branches/gcc-4_9-branch/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc