This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH INSTALLED]: const typedefs part 19/N
- From: "Daniel Berlin" <dberlin at dberlin dot org>
- To: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Aug 2007 10:33:32 -0400
- Subject: Re: [PATCH INSTALLED]: const typedefs part 19/N
- References: <Pine.GSO.4.58.0708262352520.25986@caipclassic.rutgers.edu>
On 8/26/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> This patch constifies cfg_hooks and debug_hooks, plus a bunch of of other
> random predicates.
>
> Bootstrapped on sparc-sun-solaris2.10, no regressions. I also ran my
> cross-compile farm to check platforms with other debug-types activating
> different debugging code in the various *out.c files. I didn't see any
> relevant warnings from building cc1 to those targets.
>
> Installed on mainline.
>
> --Kaveh
>
const_last_stmt vs last_stmt?
Please, no.
That crosses the line for me from "i don't care if you want to
constify a bunch of things" to "stop making the code look horrible".
Really, all something like that will do is confuse people.
Honestly, if you want to have const vs non-const return values, for
the same function, we should simply be using C++.
If we aren't going to do that, please don't add new functions that
simply have const_ prefix'd, as it just makes things ugly for no
discernible gain.
I know most SSA and middle end maintainers agree here.
I kindly ask you to revert your change to make const_last_stmt and
last_stmt (and others new functions that are prefix'd with const_)