This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[google][patch] Put make_heap's declaration on a single line to work around inconsistent debug locations
- From: Jeffrey Yasskin <jyasskin at google dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>
- Date: Fri, 22 Jul 2011 15:46:16 -0700
- Subject: [google][patch] Put make_heap's declaration on a single line to work around inconsistent debug locations
For the google/gcc-4_6 branch _only_. I'll fix the inconsistency in
debug locations later for trunk and google/main.
In some translation units the debug location of make_heap is the
location of its name; in other TUs it's the location of the closing
')'. This causes false positives in gold's ODR checker. Until I can
find why the locations are inconsistent, we can work around the
problem by putting the name and closing ')' on the same line.
libstdc++-v3/ChangeLog
2011-07-22 Jeffrey Yasskin <jyasskin@google.com>
* include/bits/stl_heap.h(make_heap): Remove a newline.
Index: libstdc++-v3/include/bits/stl_heap.h
===================================================================
--- libstdc++-v3/include/bits/stl_heap.h (revision 176544)
+++ libstdc++-v3/include/bits/stl_heap.h (working copy)
@@ -412,8 +412,7 @@
*/
template<typename _RandomAccessIterator, typename _Compare>
void
- make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
- _Compare __comp)
+ make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;