aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-08-29 13:41:25 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-08-29 13:41:25 +0000
commit5f8ded66289f6f090a2a7960241708990d3da807 (patch)
tree271055b104ee1d42602d1a5fcd62c8a6183e3e5e /gcc
parent31029ad7e8b763f6404f794ef3af6aeefcfb6f48 (diff)
downloadgcc-5f8ded66289f6f090a2a7960241708990d3da807.zip
gcc-5f8ded66289f6f090a2a7960241708990d3da807.tar.gz
gcc-5f8ded66289f6f090a2a7960241708990d3da807.tar.bz2
tree.c (tree_code_name): Constify a char*.
* tree.c (tree_code_name): Constify a char*. * tree.h (tree_code_name, decl_printable_name): Likewise. * function.h (struct function): Likewise. * toplev.c (decl_name, decl_printable_name): Likewise. * vax/vms.h (MAYBE_VMS_FUNCTION_PROLOGUE): Likewise. * objc/objc-act.c (decl_printable_name): Remove redundant prototype. (init_objc): Remove function pointer cast. From-SVN: r28966
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/config/vax/vms.h2
-rw-r--r--gcc/function.h4
-rw-r--r--gcc/objc/objc-act.c5
-rw-r--r--gcc/toplev.c6
-rw-r--r--gcc/tree.c2
-rw-r--r--gcc/tree.h4
7 files changed, 25 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1ecc178..f07aec8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,18 @@
+Sun Aug 29 09:36:50 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * tree.c (tree_code_name): Constify a char*.
+
+ * tree.h (tree_code_name, decl_printable_name): Likewise.
+
+ * function.h (struct function): Likewise.
+
+ * toplev.c (decl_name, decl_printable_name): Likewise.
+
+ * vax/vms.h (MAYBE_VMS_FUNCTION_PROLOGUE): Likewise.
+
+ * objc/objc-act.c (decl_printable_name): Remove redundant prototype.
+ (init_objc): Remove function pointer cast.
+
Sun Aug 29 05:01:17 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.md (interspace_jump): New pattern.
diff --git a/gcc/config/vax/vms.h b/gcc/config/vax/vms.h
index a430279..1f84f63 100644
--- a/gcc/config/vax/vms.h
+++ b/gcc/config/vax/vms.h
@@ -94,7 +94,7 @@ Boston, MA 02111-1307, USA. */
* setting of -4 will end up adding them right back again, but don't bother.
*/
#define MAYBE_VMS_FUNCTION_PROLOGUE(FILE) \
-{ char *p = current_function_name; \
+{ const char *p = current_function_name; \
int is_main = strcmp ("main", p) == 0; \
while (!is_main && *p != '\0') \
{ \
diff --git a/gcc/function.h b/gcc/function.h
index 49cbe59..86d2c3c 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -186,7 +186,7 @@ struct function
/* For function.c. */
/* Name of this function. */
- char *name;
+ const char *name;
/* Points to the FUNCTION_DECL of this function. */
tree decl;
@@ -280,7 +280,7 @@ struct function
/* Language-specific reason why the current function cannot be made
inline. */
- char *cannot_inline;
+ const char *cannot_inline;
/* Nonzero if instrumentation calls for function entry and exit should be
generated. */
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 3bafafe..7259595 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -203,9 +203,6 @@ static int check_methods_accessible PROTO((tree, tree,
static void encode_aggregate_within PROTO((tree, int, int,
int, int));
-/* We handle printing method names ourselves for ObjC */
-extern char *(*decl_printable_name) ();
-
/* Misc. bookkeeping */
typedef struct hashed_entry *hash;
@@ -8213,7 +8210,7 @@ init_objc ()
synth_module_prologue ();
/* Change the default error function */
- decl_printable_name = (char* (*)()) objc_printable_name;
+ decl_printable_name = objc_printable_name;
}
static void
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 112c891..c6cac41 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -183,7 +183,7 @@ void pedwarn_with_file_and_line PVPROTO((const char *file,
int line, const char *s, ...));
void sorry PVPROTO((const char *s, ...));
static void set_target_switch PROTO((const char *));
-static char *decl_name PROTO((tree, int));
+static const char *decl_name PROTO((tree, int));
static void vmessage PROTO((const char *, const char *, va_list));
static void v_message_with_file_and_line PROTO((const char *, int, int,
const char *, va_list));
@@ -359,7 +359,7 @@ int sorrycount = 0;
2: and any other information that might be interesting, such as function
parameter types in C++. */
-char *(*decl_printable_name) PROTO ((tree, int));
+const char *(*decl_printable_name) PROTO ((tree, int));
/* Pointer to function to compute rtl for a language-specific tree code. */
@@ -1455,7 +1455,7 @@ fatal_io_error (name)
/* This is the default decl_printable_name function. */
-static char *
+static const char *
decl_name (decl, verbosity)
tree decl;
int verbosity ATTRIBUTE_UNUSED;
diff --git a/gcc/tree.c b/gcc/tree.c
index dcc0ac7..c9abd06 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -193,7 +193,7 @@ int tree_code_length[MAX_TREE_CODES] = {
Used for printing out the tree and error messages. */
#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
-char *tree_code_name[MAX_TREE_CODES] = {
+const char *tree_code_name[MAX_TREE_CODES] = {
#include "tree.def"
};
#undef DEFTREECODE
diff --git a/gcc/tree.h b/gcc/tree.h
index 703aad0..bd9b34d 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -63,7 +63,7 @@ extern int tree_code_length[MAX_TREE_CODES];
/* Names of tree components. */
-extern char *tree_code_name[MAX_TREE_CODES];
+extern const char *tree_code_name[MAX_TREE_CODES];
/* Codes that identify the various built in functions
so that expand_call can identify them quickly. */
@@ -1928,7 +1928,7 @@ extern int all_types_permanent;
2: and any other information that might be interesting, such as function
parameter types in C++. */
-extern char *(*decl_printable_name) PROTO((tree, int));
+extern const char *(*decl_printable_name) PROTO((tree, int));
/* Pointer to function to finish handling an incomplete decl at the
end of compilation. */