Reorganize and clean debug headers

François Dumont frs.dumont@gmail.com
Mon Jan 19 23:11:00 GMT 2015


Hi

     While working on new debug checks I came up with reorganizing 
existing ones to limit as much as possible useless includes.

     Tested under linux x86_64.

     From the latest mails I saw on this mailing list I guess I must 
wait, right ?

2015-01-20  François Dumont  <fdumont@gcc.gnu.org>

     * include/debug/debug.h ([_GLIBCXX_DEBUG_ASSERT,
     _GLIBCXX_DEBUG_PEDASSERT, _GLIBCXX_DEBUG_ONLY]): Move definition...
     * include/debug/assertions.h: ...here, new.
     * include/debug/functions.h (__foreign_iterator): Move definition...
     * include/debug/functions.tcc: ...here, new.
     * include/Makefile.am: Add new above debug files.
     * include/Makefile.in: Regenerate.
     * include/debug/formatter.h: Include typeinfo only if rtti enabled.
     [_GLIBCXX_TYPEID]: New, use it throughout the file.
     * include/debug/safe_iterator.h: Replace debug.h include with
     assertions.h.
     (__check_dereferenceable, __valid_range): Move here overload for
     _Safe_iterator.
     (struct __is_safe_random_iterator): Move here partial specialization
     for _Safe_iterator.
     (__check_singular_aux): Move...
     * include/debug/safe_base.h (__check_singular_aux): ... here.
     * include/debug/safe_local_iterator.h (__check_dereferenceable)
     (__valid_range): Move here overload for _Safe_local_iterator.
     * include/debug/safe_sequence.h
     * include/debug/safe_unordered_container.h
     * include/debug/array: Replace safe_sequence.h include with
     formatter.h and macros.h.
     * include/debug/deque: Include functions.tcc.
     * include/debug/forward_list: Likewise.
     * include/debug/list: Likewise.
     * include/debug/string: Likewise.
     * include/debug/vector: Likewise.
     * include/bits/unique_ptr.h: Replace debug.h include with new
     assertions.h.
     * include/bits/stl_iterator_base_funcs.h: Likewise.
     * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
     Adjust dg-error line number.
     * testsuite/23_containers/array/tuple_interface/
     tuple_element_debug_neg.cc: Likewise.

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug.patch
Type: text/x-patch
Size: 34512 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150119/60727f9c/attachment.bin>


More information about the Libstdc++ mailing list