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: Introduce new typedefs: const_tree, const_rtx, etc.


On 8/12/06, Kaveh R. Ghazi <ghazi@caipclassic.rutgers.edu> wrote:
As discussed here:
http://gcc.gnu.org/ml/gcc/2006-06/msg00929.html

I'd like to introduce auxiliary const typedefs that parallel existing
core types in GCC.  This will allow us to constify various things,
mainly function parameters that currently take a plain tree, rtx, etc.

The first step is to add the new types to coretypes.h.  We must also
update the "checking" macros to use __typeof() to preserve the
constness of the supplied expression.  Thanks to Dave and Ian for the
suggestion.
http://gcc.gnu.org/ml/gcc/2006-07/msg00303.html

Bootstrapped on sparc-sun-solaris2.10, I used --enable-checking=yes,rtl
to ensure we exercise the modified RTL checking macros.  There were no
regressions.

Okay for mainline stage1 ?

What is the benefit of this apart from being able to check const correctness?

Richard.


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