This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH INSTALLED]: const typedefs part 19/N


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_)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]