Patchwork [google] Put make_heap's declaration on a single line to work around inconsistent debug locations

login
register
mail settings
Submitter Jeffrey Yasskin
Date July 22, 2011, 10:46 p.m.
Message ID <CANh-dXkn+mR2XGRZp_p=KQOkDuNeL3YY2br=YRaDhE95YFiHgA@mail.gmail.com>
Download mbox | patch
Permalink /patch/106397/
State New
Headers show

Comments

Jeffrey Yasskin - July 22, 2011, 10:46 p.m.
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.
Ollie Wild - July 23, 2011, 6:06 a.m.
Ok for inclusion in google/gcc-4_6.

Ollie

On Fri, Jul 22, 2011 at 5:46 PM, Jeffrey Yasskin <jyasskin@google.com> wrote:
>
> 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.
Jeffrey Yasskin - Aug. 2, 2011, 3:38 a.m.
And reverted in r177083 because I fixed the underlying problem.

On Fri, Jul 22, 2011 at 11:06 PM, Ollie Wild <aaw@google.com> wrote:
> Ok for inclusion in google/gcc-4_6.
>
> Ollie
>
> On Fri, Jul 22, 2011 at 5:46 PM, Jeffrey Yasskin <jyasskin@google.com> wrote:
>>
>> 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.
>

Patch

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;