I was doing a merge from mainline into the tuples branch this morning when I found various conflicts due to the constification patches. I realized that not only there are some routines that take 'const_tree' instead of 'tree', but also that there are new API routines as well.
I agree in general with trying to add const to functions that do not modify the argument. But I very strongly oppose the creation of new routines! We now have a whole bunch of new block_stmt_iterator routines (cbsi_*) besides the existing bsi_* routines. There are things like first_stmt and const_first_stmt. That is just plain ugly. I realize that this is probably needed because of the const changes, but I would like us to stop and thinking about polluting the whole API namespace so gratuitously. Our internal APIs are already confusing to begin with. This is not helping. Please consider reverting these API changes. Thanks.