char*.
* gmon-sol2.c (monstartup, moncontrol): Cast ptrs to long, not
int.
(_mcleanup): Ensure value matches format specifier in sprintf.
* cpphash.c (special_symbol): Don't needlessly cast away
const-ness.
* cppinit.c (base_name): Delete unused prototype.
* mkdeps.c (deps_init): Make definition K&R safe.
* tree.h (built_in_class_names, built_in_names): Constify a
char*.
f:
* ansify.c (die_unless): Don't use ANSI string concatenation.
(die): Mark with ATTRIBUTE_NORETURN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32364
138bc75d-0d04-0410-961f-
82ee72b054a4
+2000-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtins.c (built_in_class_names, built_in_names): Constify a
+ char*.
+
+ * gmon-sol2.c (monstartup, moncontrol): Cast ptrs to long, not
+ int.
+ (_mcleanup): Ensure value matches format specifier in sprintf.
+
+ * cpphash.c (special_symbol): Don't needlessly cast away
+ const-ness.
+
+ * cppinit.c (base_name): Delete unused prototype.
+
+ * mkdeps.c (deps_init): Make definition K&R safe.
+
+ * tree.h (built_in_class_names, built_in_names): Constify a
+ char*.
+
2000-03-06 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.c (eligible_for_epilogue_delay): Accept
#endif
/* Define the names of the builtin function types and codes. */
-char *built_in_class_names[4]
+const char *const built_in_class_names[4]
= {"NOT_BUILT_IN", "BUILT_IN_FRONTEND", "BUILT_IN_MD", "BUILT_IN_NORMAL"};
-char *built_in_names[(int) END_BUILTINS] =
+const char *const built_in_names[(int) END_BUILTINS] =
{"BUILT_IN_ALLOCA", "BUILT_IN_ABS", "BUILT_IN_FABS", "BUILT_IN_LABS",
"BUILT_IN_FFS", "BUILT_IN_DIV", "BUILT_IN_LDIV", "BUILT_IN_FFLOOR",
"BUILT_IN_FCEIL", "BUILT_IN_FMOD", "BUILT_IN_FREM", "BUILT_IN_MEMCPY",
* so the rest of the scaling (here and in gprof) stays in ints.
*/
lowpc = (char *)
- ROUNDDOWN((unsigned)lowpc, HISTFRACTION*sizeof(HISTCOUNTER));
+ ROUNDDOWN((unsigned long)lowpc, HISTFRACTION*sizeof(HISTCOUNTER));
s_lowpc = lowpc;
highpc = (char *)
- ROUNDUP((unsigned)highpc, HISTFRACTION*sizeof(HISTCOUNTER));
+ ROUNDUP((unsigned long)highpc, HISTFRACTION*sizeof(HISTCOUNTER));
s_highpc = highpc;
s_textsize = highpc - lowpc;
monsize = (s_textsize / HISTFRACTION) + sizeof(struct phdr);
else
progname++;
- sprintf(buf, "%s/%ld.%s", profdir, getpid(), progname);
+ sprintf(buf, "%s/%ld.%s", profdir, (long) getpid(), progname);
proffile = buf;
} else {
proffile = "gmon.out";
/* start */
profil((unsigned short *)(sbuf + sizeof(struct phdr)),
ssiz - sizeof(struct phdr),
- (int)s_lowpc, s_scale);
+ (long)s_lowpc, s_scale);
profiling = 0;
} else {
/* stop */
while (!ip->nominal_fname && ip != CPP_NULL_BUFFER (pfile))
ip = CPP_PREV_BUFFER (ip);
if (ip->system_header_p
- && !cpp_lookup (pfile, (U_CHAR *) "__STRICT_ANSI__", 15))
+ && !cpp_lookup (pfile, (const U_CHAR *) "__STRICT_ANSI__", 15))
CPP_PUTC_Q (pfile, '0');
else
#endif
static void append_include_chain PARAMS ((cpp_reader *,
struct cpp_pending *,
char *, int, int));
-static char *base_name PARAMS ((const char *));
static void dump_special_to_buffer PARAMS ((cpp_reader *, const char *));
static void initialize_dependency_output PARAMS ((cpp_reader *));
static void initialize_standard_includes PARAMS ((cpp_reader *));
+Mon Mar 6 13:01:19 2000 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansify.c (die_unless): Don't use ANSI string concatenation.
+ (die): Mark with ATTRIBUTE_NORETURN.
+
Wed Mar 1 00:31:44 2000 Martin von Loewis <loewis@informatik.hu-berlin.de>
* com.c (current_function_decl): Move to toplev.c.
#define die_unless(c) \
do if (!(c)) \
{ \
- fprintf (stderr, "%s:%lu: " #c "\n", argv[1], lineno); \
+ fprintf (stderr, "%s:%lu: %s\n", argv[1], lineno, #c); \
die (); \
} \
while(0)
-static void
+static void ATTRIBUTE_NORETURN
die (void)
{
exit (1);
/* Public routines. */
struct deps *
-deps_init (void)
+deps_init ()
{
struct deps *d = (struct deps *) xmalloc (sizeof (struct deps));
};
/* Names for the above. */
-extern char *built_in_class_names[4];
+extern const char *const built_in_class_names[4];
/* Codes that identify the various built in functions
so that expand_call can identify them quickly. */
};
/* Names for the above. */
-extern char *built_in_names[(int) END_BUILTINS];
+extern const char *const built_in_names[(int) END_BUILTINS];
\f
/* The definition of tree nodes fills the next several pages. */