From: Mike Frysinger Date: Fri, 12 Aug 2016 14:11:26 +0000 (+0800) Subject: sim: cgen: constify mode_names X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c171e25a8c83fc26b78430fa632fa9e64f61050;p=binutils-gdb.git sim: cgen: constify mode_names --- diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 868553b0f1b..e8da2b196c4 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,8 @@ +2016-08-13 Mike Frysinger + + * cgen-types.h (mode_names): Mark const. + * cgen-utils.c (mode_names): Likewise. + 2016-08-13 Mike Frysinger * cgen-defs.h (struct cgen_state): Delete argv and envp. diff --git a/sim/common/cgen-types.h b/sim/common/cgen-types.h index e71fb1b201f..94d6933e4fa 100644 --- a/sim/common/cgen-types.h +++ b/sim/common/cgen-types.h @@ -56,7 +56,7 @@ typedef enum mode_type { #define MAX_TARGET_MODES ((int) MODE_TARGET_MAX) #define MAX_MODES ((int) MODE_MAX) -extern const char *mode_names[]; +extern const char * const mode_names[]; #define MODE_NAME(m) (mode_names[m]) typedef void VOID; diff --git a/sim/common/cgen-utils.c b/sim/common/cgen-utils.c index d17fb42ce1c..13de592cdf7 100644 --- a/sim/common/cgen-utils.c +++ b/sim/common/cgen-utils.c @@ -28,7 +28,7 @@ along with this program. If not, see . */ #define SEMOPS_DEFINE_INLINE #include "cgen-ops.h" -const char *mode_names[] = { +const char * const mode_names[] = { "VOID", "BI", "QI",