summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog24
-rw-r--r--gcc/reload1.c2
-rw-r--r--gcc/sdbout.c17
-rw-r--r--gcc/sdbout.h1
-rw-r--r--gcc/stmt.c16
-rw-r--r--gcc/toplev.c3
-rw-r--r--gcc/toplev.h1
-rw-r--r--gcc/unroll.c17
-rw-r--r--gcc/varasm.c17
9 files changed, 72 insertions, 26 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9484006f0dd..99b22c7a622 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -21,6 +21,30 @@ Mon Jun 22 08:18:46 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
and use %ld specifier.
(adorn_decl): Likewise, twice.
+ * reload1.c (reload_cse_regs): Cast first arg of `bzero' to char *.
+
+ * sdbout.c: Include output.h and toplev.h.
+ (PUT_SDB_INT_VAL): Use HOST_WIDE_INT_PRINT_DEV to print argument
+ `a'. Cast `a' to HOST_WIDE_INT to force it to always be so.
+ (PUT_SDB_SIZE): Likewise.
+
+ * sdbout.h (sdbout_mark_begin_function): Add prototype.
+
+ * stmt.c (check_for_full_enumeration_handling): Cast argument of
+ `warning' to long and use %ld specifier.
+
+ * toplev.c (main): Likewise for `fprintf'.
+
+ * toplev.h (output_file_directive): Add prototype.
+
+ * unroll.c (unroll_loop): Use HOST_WIDE_INT_PRINT_DEC specifier in
+ call to `fprintf'.
+ (precondition_loop_p): Likewise.
+
+ * varasm.c Include sdbout.h.
+ (assemble_static_space): Move sometimes-unused variable `rounded'
+ into the scope in which it is used.
+
Sun Jun 21 17:05:34 1998 Dave Love <d.love@dl.ac.uk>
* Makefile.in (install-info): Use install-info program if
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 22203929b1d..3d0c3cb1bea 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -8171,7 +8171,7 @@ reload_cse_regs (first)
init_alias_analysis ();
reg_values = (rtx *) alloca (FIRST_PSEUDO_REGISTER * sizeof (rtx));
- bzero (reg_values, FIRST_PSEUDO_REGISTER * sizeof (rtx));
+ bzero ((char *)reg_values, FIRST_PSEUDO_REGISTER * sizeof (rtx));
/* Create our EXPR_LIST structures on reload_obstack, so that we can
free them when we are done. */
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 20a71f39f78..62559a93acf 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -52,6 +52,8 @@ AT&T C compiler. From the example below I would conclude the following:
#include "flags.h"
#include "insn-config.h"
#include "reload.h"
+#include "output.h"
+#include "toplev.h"
/* Mips systems use the SDB functions to dump out symbols, but do not
supply usable syms.h include files. Which syms.h file to use is a
@@ -171,7 +173,13 @@ static void sdbout_reg_parms PROTO((tree));
#endif
#ifndef PUT_SDB_INT_VAL
-#define PUT_SDB_INT_VAL(a) fprintf (asm_out_file, "\t.val\t%d%s", (a), SDB_DELIM)
+#define PUT_SDB_INT_VAL(a) \
+ do { \
+ fputs ("\t.val\t", asm_out_file); \
+ fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)(a)); \
+ fprintf (asm_out_file, "%s", SDB_DELIM); \
+ } while (0)
+
#endif
#ifndef PUT_SDB_VAL
@@ -201,7 +209,12 @@ do { fprintf (asm_out_file, "\t.def\t"); \
#endif
#ifndef PUT_SDB_SIZE
-#define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\t.size\t%d%s", a, SDB_DELIM)
+#define PUT_SDB_SIZE(a) \
+ do { \
+ fputs ("\t.size\t", asm_out_file); \
+ fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)(a)); \
+ fprintf (asm_out_file, "%s", SDB_DELIM); \
+ } while(0)
#endif
#ifndef PUT_SDB_START_DIM
diff --git a/gcc/sdbout.h b/gcc/sdbout.h
index 3ddaa92cddd..dcbd6c1ce76 100644
--- a/gcc/sdbout.h
+++ b/gcc/sdbout.h
@@ -35,4 +35,5 @@ extern void sdbout_end_epilogue PROTO ((void));
extern void sdbout_start_new_source_file PROTO ((char *));
extern void sdbout_resume_previous_source_file PROTO ((void));
+extern void sdbout_mark_begin_function PROTO ((void));
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 138783b47b6..feeea171693 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -4524,11 +4524,11 @@ check_for_full_enumeration_handling (type)
if (!chain)
{
if (TYPE_NAME (type) == 0)
- warning ("case value `%d' not in enumerated type",
- TREE_INT_CST_LOW (n->low));
+ warning ("case value `%ld' not in enumerated type",
+ (long) TREE_INT_CST_LOW (n->low));
else
- warning ("case value `%d' not in enumerated type `%s'",
- TREE_INT_CST_LOW (n->low),
+ warning ("case value `%ld' not in enumerated type `%s'",
+ (long) TREE_INT_CST_LOW (n->low),
IDENTIFIER_POINTER ((TREE_CODE (TYPE_NAME (type))
== IDENTIFIER_NODE)
? TYPE_NAME (type)
@@ -4544,11 +4544,11 @@ check_for_full_enumeration_handling (type)
if (!chain)
{
if (TYPE_NAME (type) == 0)
- warning ("case value `%d' not in enumerated type",
- TREE_INT_CST_LOW (n->high));
+ warning ("case value `%ld' not in enumerated type",
+ (long) TREE_INT_CST_LOW (n->high));
else
- warning ("case value `%d' not in enumerated type `%s'",
- TREE_INT_CST_LOW (n->high),
+ warning ("case value `%ld' not in enumerated type `%s'",
+ (long) TREE_INT_CST_LOW (n->high),
IDENTIFIER_POINTER ((TREE_CODE (TYPE_NAME (type))
== IDENTIFIER_NODE)
? TYPE_NAME (type)
diff --git a/gcc/toplev.c b/gcc/toplev.c
index dc2effdb966..fb0245a0c3a 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -4410,8 +4410,7 @@ main (argc, argv, envp)
{
char *lim = (char *) sbrk (0);
- fprintf (stderr, "Data size %d.\n",
- lim - (char *) &environ);
+ fprintf (stderr, "Data size %ld.\n", (long)(lim - (char *) &environ));
fflush (stderr);
#ifndef __MSDOS__
diff --git a/gcc/toplev.h b/gcc/toplev.h
index a598f4dabe3..d206000df06 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -57,6 +57,7 @@ extern void set_float_handler PROTO((jmp_buf));
#ifdef BUFSIZ
extern void output_quoted_string PROTO ((FILE *, char *));
+extern void output_file_directive PROTO ((FILE *, char *));
#endif
extern void fancy_abort PROTO ((void));
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 8edebda00a9..d390110073c 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -313,8 +313,11 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
loop_n_iterations = 0;
if (loop_dump_stream && loop_n_iterations > 0)
- fprintf (loop_dump_stream,
- "Loop unrolling: %d iterations.\n", loop_n_iterations);
+ {
+ fputs ("Loop unrolling: ", loop_dump_stream);
+ fprintf (loop_dump_stream, HOST_WIDE_INT_PRINT_DEC, loop_n_iterations);
+ fputs (" iterations.\n", loop_dump_stream);
+ }
/* Find and save a pointer to the last nonnote insn in the loop. */
@@ -1312,9 +1315,13 @@ precondition_loop_p (initial_value, final_value, increment, loop_start,
*final_value = GEN_INT (loop_n_iterations);
if (loop_dump_stream)
- fprintf (loop_dump_stream,
- "Preconditioning: Success, number of iterations known, %d.\n",
- loop_n_iterations);
+ {
+ fputs ("Preconditioning: Success, number of iterations known, ",
+ loop_dump_stream);
+ fprintf (loop_dump_stream, HOST_WIDE_INT_PRINT_DEC,
+ loop_n_iterations);
+ fputs (".\n", loop_dump_stream);
+ }
return 1;
}
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 22b752d90fc..2d595d4786a 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -43,6 +43,7 @@ Boston, MA 02111-1307, USA. */
#include "real.h"
#include "toplev.h"
#include "dbxout.h"
+#include "sdbout.h"
#include "obstack.h"
#include "c-pragma.h"
@@ -1683,13 +1684,6 @@ assemble_static_space (size)
char name[12];
char *namestring;
rtx x;
-#ifndef ASM_OUTPUT_ALIGNED_LOCAL
- /* Round size up to multiple of BIGGEST_ALIGNMENT bits
- so that each uninitialized object starts on such a boundary. */
- int rounded = ((size + (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1)
- / (BIGGEST_ALIGNMENT / BITS_PER_UNIT)
- * (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
-#endif
#if 0
if (flag_shared_data)
@@ -1712,7 +1706,14 @@ assemble_static_space (size)
#ifdef ASM_OUTPUT_ALIGNED_LOCAL
ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size, BIGGEST_ALIGNMENT);
#else
- ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
+ {
+ /* Round size up to multiple of BIGGEST_ALIGNMENT bits
+ so that each uninitialized object starts on such a boundary. */
+ int rounded = ((size + (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1)
+ / (BIGGEST_ALIGNMENT / BITS_PER_UNIT)
+ * (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
+ ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
+ }
#endif
#endif
return x;