This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] implement generic debug() functions for wide_int's
- From: Pedro Alves <palves at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Oct 2017 23:22:13 +0100
- Subject: Re: [patch] implement generic debug() functions for wide_int's
- Authentication-results: sourceware.org; auth=none
- References: <CAGm3qMUoL5g4EszRwiPpfGuTJOPY5bOqigiYpzWUpkoUJTzvxg@mail.gmail.com>
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.
I.e., simply use the full prototype as function name, since it's
really what it is in C++.
Thanks,
Pedro Alves