summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-01 03:18:49 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-01 03:18:49 +0000
commit861589fec61df968f37785d48ebc33b665ae2d53 (patch)
treecdce18d86e4e63b38fc857ab5996121284168553
parent98b07039b21fb03d0988d3d0cd92c0a602b53d19 (diff)
downloadppe42-gcc-861589fec61df968f37785d48ebc33b665ae2d53.tar.gz
ppe42-gcc-861589fec61df968f37785d48ebc33b665ae2d53.zip
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2,
RTVEC_ELT): Const-ify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51676 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/rtl.h16
2 files changed, 13 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2896b2a1dac..08711640fc2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * rtl.h (RTL_CHECK1, RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2,
+ RTVEC_ELT): Const-ify.
+
2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
* diagnostic.c: Include langhooks-def.h.
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 3c511550e38..d795a4a64b9 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -264,8 +264,8 @@ struct rtvec_def {
/* The bit with a star outside the statement expr and an & inside is
so that N can be evaluated only once. */
#define RTL_CHECK1(RTX, N, C1) __extension__ \
-(*({ rtx _rtx = (RTX); int _n = (N); \
- enum rtx_code _code = GET_CODE (_rtx); \
+(*({ rtx const _rtx = (RTX); const int _n = (N); \
+ const enum rtx_code _code = GET_CODE (_rtx); \
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \
__FUNCTION__); \
@@ -275,8 +275,8 @@ struct rtvec_def {
&_rtx->fld[_n]; }))
#define RTL_CHECK2(RTX, N, C1, C2) __extension__ \
-(*({ rtx _rtx = (RTX); int _n = (N); \
- enum rtx_code _code = GET_CODE (_rtx); \
+(*({ rtx const _rtx = (RTX); const int _n = (N); \
+ const enum rtx_code _code = GET_CODE (_rtx); \
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \
__FUNCTION__); \
@@ -287,22 +287,22 @@ struct rtvec_def {
&_rtx->fld[_n]; }))
#define RTL_CHECKC1(RTX, N, C) __extension__ \
-(*({ rtx _rtx = (RTX); int _n = (N); \
+(*({ rtx const _rtx = (RTX); const int _n = (N); \
if (GET_CODE (_rtx) != (C)) \
rtl_check_failed_code1 (_rtx, (C), __FILE__, __LINE__, \
__FUNCTION__); \
&_rtx->fld[_n]; }))
#define RTL_CHECKC2(RTX, N, C1, C2) __extension__ \
-(*({ rtx _rtx = (RTX); int _n = (N); \
- enum rtx_code _code = GET_CODE (_rtx); \
+(*({ rtx const _rtx = (RTX); const int _n = (N); \
+ const enum rtx_code _code = GET_CODE (_rtx); \
if (_code != (C1) && _code != (C2)) \
rtl_check_failed_code2 (_rtx, (C1), (C2), __FILE__, __LINE__, \
__FUNCTION__); \
&_rtx->fld[_n]; }))
#define RTVEC_ELT(RTVEC, I) __extension__ \
-(*({ rtvec _rtvec = (RTVEC); int _i = (I); \
+(*({ rtvec const _rtvec = (RTVEC); const int _i = (I); \
if (_i < 0 || _i >= GET_NUM_ELEM (_rtvec)) \
rtvec_check_failed_bounds (_rtvec, _i, __FILE__, __LINE__, \
__FUNCTION__); \
OpenPOWER on IntegriCloud