summaryrefslogtreecommitdiffstats
path: root/gcc/f
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/f')
-rw-r--r--gcc/f/ChangeLog13
-rw-r--r--gcc/f/bad.c6
-rw-r--r--gcc/f/bld.c2
-rw-r--r--gcc/f/bld.h2
-rw-r--r--gcc/f/com.c6
-rw-r--r--gcc/f/intdoc.c42
-rw-r--r--gcc/f/intrin.c42
7 files changed, 63 insertions, 50 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 8c02b555374..74288f3612d 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,16 @@
+Sun Oct 7 12:27:54 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * bad.c (_ffebad_message_, ffebad_messages_): Const-ify.
+ * bld.c (ffebld_arity_op_): Likewise.
+ * bld.h (ffebld_arity_op_): Likewise.
+ * com.c (ffecom_init_0): Likewise.
+ * intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
+ _ffeintrin_imp_, names, gens, imps, specs, cc_pair,
+ cc_descriptions, cc_summaries): Likewise.
+ * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
+ _ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_,
+ ffeintrin_imps_, ffeintrin_specs_): Likewise.
+
2001-10-05 Toon Moene <toon@moene.indiv.nluug.nl>
* news.texi: Document libf2c being built as a shared library.
diff --git a/gcc/f/bad.c b/gcc/f/bad.c
index 0ecaf7484c5..aa0ae6a0b84 100644
--- a/gcc/f/bad.c
+++ b/gcc/f/bad.c
@@ -61,13 +61,13 @@ bool ffebad_is_inhibited_ = FALSE;
struct _ffebad_message_
{
- ffebadSeverity severity;
- const char *message;
+ const ffebadSeverity severity;
+ const char *const message;
};
/* Static objects accessed by functions in this module. */
-static struct _ffebad_message_ ffebad_messages_[]
+static const struct _ffebad_message_ ffebad_messages_[]
=
{
#define FFEBAD_MSGS1(KWD,SEV,MSG) { SEV, MSG },
diff --git a/gcc/f/bld.c b/gcc/f/bld.c
index dd4c8603746..6d2247f30e7 100644
--- a/gcc/f/bld.c
+++ b/gcc/f/bld.c
@@ -46,7 +46,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Externals defined here. */
-ffebldArity ffebld_arity_op_[]
+const ffebldArity ffebld_arity_op_[]
=
{
#define FFEBLD_OP(KWD,NAME,ARITY) ARITY,
diff --git a/gcc/f/bld.h b/gcc/f/bld.h
index 3347b1cd92f..bee0480849e 100644
--- a/gcc/f/bld.h
+++ b/gcc/f/bld.h
@@ -480,7 +480,7 @@ struct _ffebld_pool_stack_
/* Global objects accessed by users of this module. */
-extern ffebldArity ffebld_arity_op_[];
+extern const ffebldArity ffebld_arity_op_[];
extern struct _ffebld_pool_stack_ ffebld_pool_stack_;
/* Declare functions with prototypes. */
diff --git a/gcc/f/com.c b/gcc/f/com.c
index 8d9ad8c217a..c086c489e1a 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -11386,16 +11386,16 @@ ffecom_init_0 ()
if (ffe_is_do_internal_checks ())
{
- static char names[][12]
+ static const char names[][12]
=
{"bar", "bletch", "foo", "foobar"};
- char *name;
+ const char *name;
unsigned long ul;
double fl;
name = bsearch ("foo", &names[0], ARRAY_SIZE (names), sizeof (names[0]),
(int (*)(const void *, const void *)) strcmp);
- if (name != (char *) &names[2])
+ if (name != &names[0][2])
{
assert ("bsearch doesn't work, #define FFEPROJ_BSEARCH 0 in proj.h"
== NULL);
diff --git a/gcc/f/intdoc.c b/gcc/f/intdoc.c
index 63cfbadcec0..4ce776b004a 100644
--- a/gcc/f/intdoc.c
+++ b/gcc/f/intdoc.c
@@ -70,39 +70,39 @@ Usage: intdoc > intdoc.texi\n\
struct _ffeintrin_name_
{
- const char *name_uc;
- const char *name_lc;
- const char *name_ic;
- ffeintrinGen generic;
- ffeintrinSpec specific;
+ const char *const name_uc;
+ const char *const name_lc;
+ const char *const name_ic;
+ const ffeintrinGen generic;
+ const ffeintrinSpec specific;
};
struct _ffeintrin_gen_
{
- const char *name; /* Name as seen in program. */
- ffeintrinSpec specs[2];
+ const char *const name; /* Name as seen in program. */
+ const ffeintrinSpec specs[2];
};
struct _ffeintrin_spec_
{
- const char *name; /* Uppercase name as seen in source code,
+ const char *const name; /* Uppercase name as seen in source code,
lowercase if no source name, "none" if no
name at all (NONE case). */
- bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
- ffeintrinFamily family;
- ffeintrinImp implementation;
+ const bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
+ const ffeintrinFamily family;
+ const ffeintrinImp implementation;
};
struct _ffeintrin_imp_
{
- const char *name; /* Name of implementation. */
+ const char *const name; /* Name of implementation. */
#if 0 /* FFECOM_targetCURRENT == FFECOM_targetGCC */
- ffecomGfrt gfrt; /* gfrt index in library. */
+ const ffecomGfrt gfrt; /* gfrt index in library. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
- const char *control;
+ const char *const control;
};
-static struct _ffeintrin_name_ names[] = {
+static const struct _ffeintrin_name_ names[] = {
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) \
{ UPPER, LOWER, MIXED, FFEINTRIN_ ## GEN, FFEINTRIN_ ## SPEC },
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
@@ -117,7 +117,7 @@ static struct _ffeintrin_name_ names[] = {
#undef DEFIMPY
};
-static struct _ffeintrin_gen_ gens[] = {
+static const struct _ffeintrin_gen_ gens[] = {
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
#define DEFGEN(CODE,NAME,SPEC1,SPEC2) \
{ NAME, { SPEC1, SPEC2, }, },
@@ -132,7 +132,7 @@ static struct _ffeintrin_gen_ gens[] = {
#undef DEFIMPY
};
-static struct _ffeintrin_imp_ imps[] = {
+static const struct _ffeintrin_imp_ imps[] = {
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
@@ -157,7 +157,7 @@ static struct _ffeintrin_imp_ imps[] = {
#undef DEFIMPY
};
-static struct _ffeintrin_spec_ specs[] = {
+static const struct _ffeintrin_spec_ specs[] = {
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
@@ -171,17 +171,17 @@ static struct _ffeintrin_spec_ specs[] = {
#undef DEFIMPY
};
-struct cc_pair { ffeintrinImp imp; const char *text; };
+struct cc_pair { const ffeintrinImp imp; const char *const text; };
static const char *descriptions[FFEINTRIN_imp] = { 0 };
-static struct cc_pair cc_descriptions[] = {
+static const struct cc_pair cc_descriptions[] = {
#define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, DESCRIPTION },
#include "intdoc.h0"
#undef DEFDOC
};
static const char *summaries[FFEINTRIN_imp] = { 0 };
-static struct cc_pair cc_summaries[] = {
+static const struct cc_pair cc_summaries[] = {
#define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, SUMMARY },
#include "intdoc.h0"
#undef DEFDOC
diff --git a/gcc/f/intrin.c b/gcc/f/intrin.c
index 31ebd96f912..add9902fc73 100644
--- a/gcc/f/intrin.c
+++ b/gcc/f/intrin.c
@@ -32,39 +32,39 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct _ffeintrin_name_
{
- const char *name_uc;
- const char *name_lc;
- const char *name_ic;
- ffeintrinGen generic;
- ffeintrinSpec specific;
+ const char *const name_uc;
+ const char *const name_lc;
+ const char *const name_ic;
+ const ffeintrinGen generic;
+ const ffeintrinSpec specific;
};
struct _ffeintrin_gen_
{
- const char *name; /* Name as seen in program. */
- ffeintrinSpec specs[2];
+ const char *const name; /* Name as seen in program. */
+ const ffeintrinSpec specs[2];
};
struct _ffeintrin_spec_
{
- const char *name; /* Uppercase name as seen in source code,
+ const char *const name; /* Uppercase name as seen in source code,
lowercase if no source name, "none" if no
name at all (NONE case). */
- bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
- ffeintrinFamily family;
- ffeintrinImp implementation;
+ const bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
+ const ffeintrinFamily family;
+ const ffeintrinImp implementation;
};
struct _ffeintrin_imp_
{
- const char *name; /* Name of implementation. */
+ const char *const name; /* Name of implementation. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC
- ffecomGfrt gfrt_direct; /* library routine, direct-callable form. */
- ffecomGfrt gfrt_f2c; /* library routine, f2c-callable form. */
- ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */
+ const ffecomGfrt gfrt_direct;/* library routine, direct-callable form. */
+ const ffecomGfrt gfrt_f2c; /* library routine, f2c-callable form. */
+ const ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
- const char *control;
- char y2kbad;
+ const char *const control;
+ const char y2kbad;
};
static ffebad ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
@@ -77,7 +77,7 @@ static ffebad ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
static bool ffeintrin_check_any_ (ffebld arglist);
static int ffeintrin_cmp_name_ (const void *name, const void *intrinsic);
-static struct _ffeintrin_name_ ffeintrin_names_[]
+static const struct _ffeintrin_name_ ffeintrin_names_[]
=
{ /* Alpha order. */
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) \
@@ -94,7 +94,7 @@ static struct _ffeintrin_name_ ffeintrin_names_[]
#undef DEFIMPY
};
-static struct _ffeintrin_gen_ ffeintrin_gens_[]
+static const struct _ffeintrin_gen_ ffeintrin_gens_[]
=
{
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
@@ -111,7 +111,7 @@ static struct _ffeintrin_gen_ ffeintrin_gens_[]
#undef DEFIMPY
};
-static struct _ffeintrin_imp_ ffeintrin_imps_[]
+static const struct _ffeintrin_imp_ ffeintrin_imps_[]
=
{
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
@@ -140,7 +140,7 @@ static struct _ffeintrin_imp_ ffeintrin_imps_[]
#undef DEFIMPY
};
-static struct _ffeintrin_spec_ ffeintrin_specs_[]
+static const struct _ffeintrin_spec_ ffeintrin_specs_[]
=
{
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
OpenPOWER on IntegriCloud