On 10/18/2017 06:22 PM, Pedro Alves wrote:
On 10/18/2017 06:08 PM, Aldy Hernandez wrote:

Also, do we have a blessed way of specifying overloaded functions in
ChangeLog's?  I couldn't find anything in our GCC coding guidelines or
in the GNU coding guidelines.  For lack of direction, I'm doing the
following:

* wide-int.cc (debug) [const wide_int &]: New.
(debug) [const wide_int *]: New.
(debug) [const widest_int &]: New.
(debug) [const widest_int *]: New.

It seems appropriate, as that is the GNU way of changelogs for a
conditional change to a function ???.

Doesn't seem that appropriate to me.  Square brackets are used for
conditional compilation (#ifdef etc.), but overloads are not that.

I'd suggest looking in libstdc++'s ChangeLog for precedents.  It's where
I looked at when I had the same question for GDB, FWIW.  E.g., a very
recent libstdc++ commit from Jon had:

         * include/bits/stl_map.h (map::insert(value_type&&))
         (map::insert(const_iterator, value_type&&)): Add overload for rvalues.

...but that's sooo ugly :).

Very well.  Committed the patch below.

Thanks for setting me straight.

commit 1a91de5beb16d130bed17f6eeb6b5ca6af454003 (HEAD -> trunk)
Author: Aldy Hernandez <al...@redhat.com>
Date:   Thu Oct 19 03:49:34 2017 -0400

Update my last ChangeLog entry to properly specify overloaded functions.

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a139a824d35..e43c53661e9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -17,10 +17,10 @@

 2017-10-18  Aldy Hernandez  <al...@redhat.com>

-       * wide-int.cc (debug) [const wide_int &]: New.
-       (debug) [const wide_int *]: New.
-       (debug) [const widest_int &]: New.
-       (debug) [const widest_int *]: New.
+       * wide-int.cc (debug (const wide_int &)): New.
+       (debug (const wide_int *)): New.
+       (debug (const widest_int &)): New.
+       (debug (const widest_int *)): New.

Reply via email to