* 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
+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.
* 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') \
{ \
/* For function.c. */
/* Name of this function. */
- char *name;
+ const char *name;
/* Points to the FUNCTION_DECL of this function. */
tree decl;
/* 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. */
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;
synth_module_prologue ();
/* Change the default error function */
- decl_printable_name = (char* (*)()) objc_printable_name;
+ decl_printable_name = objc_printable_name;
}
\f
static void
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));
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. */
/* This is the default decl_printable_name function. */
-static char *
+static const char *
decl_name (decl, verbosity)
tree decl;
int verbosity ATTRIBUTE_UNUSED;
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
/* Names of tree components. */
-extern char *tree_code_name[MAX_TREE_CODES];
+extern const char *tree_code_name[MAX_TREE_CODES];
\f
/* Codes that identify the various built in functions
so that expand_call can identify them quickly. */
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. */