summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-20 11:31:54 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-20 11:31:54 +0000
commit99c149474045fdf0e8347520f8e3b6bb6d932cfa (patch)
treefb640fe4c8c99759602e3a82e0ed835789f267eb /gcc
parentc866d7d40dedbe3a523310b611dedb93496e69f2 (diff)
downloadgcc-99c149474045fdf0e8347520f8e3b6bb6d932cfa.tar.gz
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning
of the declaration. * c-decl.c (finish_decl): Use parentheses around && within ||. * rtl.c: Include stdlib.h. (read_skip_spaces): Add parentheses around assignments used as truth values. (read_rtx): Initialize list_rtx. * cppexp.c (parse_number): Use || when operands are truth values. * alias.c (find_base_value): Add default case. (memrefs_conflict): Likewise. * combine.c (sets_function_arg_p): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (contains_replace_regs): Likewise. * rtlanal.c (jmp_uses_reg_or_mem): Likewise. * fold-const.c (fold_convert): Use "&&" for truth values. (fold): Add default case. * sdbout.c (sdbout_field_types): Fix typo in declaration. (sdbout_one_type): Add default case. * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS. (some_operand): Add default case. (input_operand): Likewise. (signed_comparison_operator): Likewise. (divmod_operator): Likewise. (alpha_set_memflags_1): Likewise. * reload1.c (reload_cse_simplify_operands): Ensure function always returns a value. * scan-decls.c (scan_decls): Likewise. * c-lex.c (skip_white_space): Fix typo in declaraion. * c-typeck.c (comp_target_types): Add parentheses around assignment used as truth value. (print_spelling): Likewise. (constructor_implicit, constructor_result): Remove unused variables. * collect2.c (scan_library): Protect prototype with #ifdef SCAN_LIBRARIES. * emit-rtl.c (find_line_note): Fix typo in declaration. * final.c (asm_insn_count): Protect prototype with #ifdef HAVE_ATTR_length. * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC. (try_pre_increment_1, try_pre_increment): Likewise. * regclass.c (auto_inc_dec_reg_p): Protect prototype with #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit. * gcov-io.h (__store_long, __write_long, __read_long): Fix unsigned/signed comparisons. * gcov.c (read_files): Remove unused "first_type" variable. (scan _for_source_files): Initialize s_ptr. (function_summary): Eliminate "%lf" formatting, use %ld for longs. (output_data): Initialize branch_probs and last_line_num. Eliminate "%lf" formatting, use "%ld" for longs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17158 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog53
-rw-r--r--gcc/alias.c6
-rw-r--r--gcc/bitmap.c2
-rw-r--r--gcc/c-decl.c2
-rw-r--r--gcc/c-lex.c2
-rw-r--r--gcc/c-typeck.c10
-rw-r--r--gcc/collect2.c2
-rw-r--r--gcc/combine.c3
-rw-r--r--gcc/config/alpha/alpha.c17
-rw-r--r--gcc/cppexp.c44
-rw-r--r--gcc/emit-rtl.c2
-rw-r--r--gcc/final.c2
-rw-r--r--gcc/flow.c4
-rw-r--r--gcc/fold-const.c4
-rw-r--r--gcc/gcov-io.h8
-rw-r--r--gcc/gcov.c64
-rw-r--r--gcc/genemit.c7
-rw-r--r--gcc/local-alloc.c3
-rw-r--r--gcc/regclass.c6
-rw-r--r--gcc/reload1.c2
-rw-r--r--gcc/rtl.c9
-rw-r--r--gcc/rtlanal.c3
-rw-r--r--gcc/scan-decls.c14
-rw-r--r--gcc/sdbout.c11
24 files changed, 211 insertions, 69 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aed4461221c..0228bc63107 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,56 @@
+Sat Dec 20 11:26:47 1997 Kaveh R. Ghazi <ghazi@tragg.rutgers.edu>
+ Jeff Law <law@cygnus.com>
+
+ * bitmap.c (bitmap_clear): Ensure `inline' is at the beginning
+ of the declaration.
+ * c-decl.c (finish_decl): Use parentheses around && within ||.
+ * rtl.c: Include stdlib.h.
+ (read_skip_spaces): Add parentheses around assignments used as
+ truth values.
+ (read_rtx): Initialize list_rtx.
+ * cppexp.c (parse_number): Use || when operands are truth values.
+ * alias.c (find_base_value): Add default case.
+ (memrefs_conflict): Likewise.
+ * combine.c (sets_function_arg_p): Likewise.
+ * genemit.c (gen_exp): Likewise.
+ * local-alloc.c (contains_replace_regs): Likewise.
+ * rtlanal.c (jmp_uses_reg_or_mem): Likewise.
+ * fold-const.c (fold_convert): Use "&&" for truth values.
+ (fold): Add default case.
+ * sdbout.c (sdbout_field_types): Fix typo in declaration.
+ (sdbout_one_type): Add default case.
+ * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS.
+ (some_operand): Add default case.
+ (input_operand): Likewise.
+ (signed_comparison_operator): Likewise.
+ (divmod_operator): Likewise.
+ (alpha_set_memflags_1): Likewise.
+ * reload1.c (reload_cse_simplify_operands): Ensure function
+ always returns a value.
+ * scan-decls.c (scan_decls): Likewise.
+ * c-lex.c (skip_white_space): Fix typo in declaraion.
+ * c-typeck.c (comp_target_types): Add parentheses around assignment
+ used as truth value.
+ (print_spelling): Likewise.
+ (constructor_implicit, constructor_result): Remove unused variables.
+ * collect2.c (scan_library): Protect prototype with
+ #ifdef SCAN_LIBRARIES.
+ * emit-rtl.c (find_line_note): Fix typo in declaration.
+ * final.c (asm_insn_count): Protect prototype with
+ #ifdef HAVE_ATTR_length.
+ * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC.
+ (try_pre_increment_1, try_pre_increment): Likewise.
+ * regclass.c (auto_inc_dec_reg_p): Protect prototype with
+ #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit.
+ * gcov-io.h (__store_long, __write_long, __read_long): Fix
+ unsigned/signed comparisons.
+ * gcov.c (read_files): Remove unused "first_type" variable.
+ (scan _for_source_files): Initialize s_ptr.
+ (function_summary): Eliminate "%lf" formatting, use %ld for
+ longs.
+ (output_data): Initialize branch_probs and last_line_num.
+ Eliminate "%lf" formatting, use "%ld" for longs.
+
Fri Dec 19 17:31:11 1997 Ian Lance Taylor <ian@cygnus.com>
* mips16.S: New file.
diff --git a/gcc/alias.c b/gcc/alias.c
index 333aa5c754e..1363cfe8153 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -202,6 +202,9 @@ find_base_value (src)
case HIGH:
return find_base_value (XEXP (src, 0));
+
+ default:
+ break;
}
return 0;
@@ -759,6 +762,9 @@ memrefs_conflict_p (xsize, x, ysize, y, c)
c /= INTVAL (x1);
return memrefs_conflict_p (xsize, x0, ysize, y0, c);
}
+
+ default:
+ break;
}
/* Treat an access through an AND (e.g. a subword access on an Alpha)
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index f982f46392a..f3c9a91e027 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -222,7 +222,7 @@ bitmap_element_link (head, element)
/* Clear a bitmap by freeing the linked list. */
-void INLINE
+INLINE void
bitmap_clear (head)
bitmap head;
{
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 7688dd23d67..895ce368bbe 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3888,7 +3888,7 @@ finish_decl (decl, init, asmspec_tree)
declaration into a file scope one. This can be detected
by TREE_ASM_WRITTEN being set. */
(DECL_INITIAL (decl) != 0
- || DECL_CONTEXT (decl) != 0 && ! TREE_ASM_WRITTEN (decl))
+ || (DECL_CONTEXT (decl) != 0 && ! TREE_ASM_WRITTEN (decl)))
:
/* An automatic variable with an incomplete type
is an error. */
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index a1ef5362ca9..1b5b4843742 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -135,7 +135,7 @@ static int end_of_file;
static int nextchar = -1;
#endif
-static int skip_which_space PROTO((int));
+static int skip_white_space PROTO((int));
static char *extend_token_buffer PROTO((char *));
static int readescape PROTO((int *));
int check_newline ();
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 135ca9b09c2..5bf265ac208 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -547,7 +547,7 @@ comp_target_types (ttl, ttr)
int val;
/* Give maybe_objc_comptypes a crack at letting these types through. */
- if (val = maybe_objc_comptypes (ttl, ttr, 1) >= 0)
+ if ((val = maybe_objc_comptypes (ttl, ttr, 1)) >= 0)
return val;
val = comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (ttl)),
@@ -4700,7 +4700,7 @@ print_spelling (buffer)
{
if (p->kind == SPELLING_MEMBER)
*d++ = '.';
- for (s = p->u.s; *d = *s++; d++)
+ for (s = p->u.s; (*d = *s++); d++)
;
}
*d++ = '\0';
@@ -5106,9 +5106,6 @@ static int constructor_depth;
/* 0 if implicitly pushing constructor levels is allowed. */
int constructor_no_implicit = 0; /* 0 for C; 1 for some other languages. */
-/* 1 if this constructor level was entered implicitly. */
-static int constructor_implicit;
-
static int require_constant_value;
static int require_constant_elements;
@@ -5127,9 +5124,6 @@ static char *constructor_asmspec;
/* Nonzero if this is an initializer for a top-level decl. */
static int constructor_top_level;
-/* When we finish reading a constructor expression
- (constructor_decl is 0), the CONSTRUCTOR goes here. */
-static tree constructor_result;
/* This stack has a level for each implicit or explicit level of
structuring in the initializer, including the outermost one. It
diff --git a/gcc/collect2.c b/gcc/collect2.c
index aa23a0f7cdd..d3627358a7d 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -299,7 +299,9 @@ static void write_list_with_asm PROTO((FILE *, char *, struct id *));
static void write_c_file PROTO((FILE *, char *));
static void write_export_file PROTO((FILE *));
static void scan_prog_file PROTO((char *, enum pass));
+#ifdef SCAN_LIBRARIES
static void scan_libraries PROTO((char *));
+#endif
char *xcalloc ();
char *xmalloc ();
diff --git a/gcc/combine.c b/gcc/combine.c
index a17c999a85b..1546ec64845 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1087,6 +1087,9 @@ sets_function_arg_p (pat)
return (GET_CODE (inner_dest) == REG
&& REGNO (inner_dest) < FIRST_PSEUDO_REGISTER
&& FUNCTION_ARG_REGNO_P (REGNO (inner_dest)));
+
+ default:
+ break;
}
return 0;
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 6b28bda2011..b28673c09d7 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -108,8 +108,10 @@ static rtx alpha_emit_set_const_1 PROTO((rtx, enum machine_mode,
static void add_long_const PROTO((FILE *, HOST_WIDE_INT, int, int, int));
/* Compute the size of the save area in the stack. */
+#if OPEN_VMS
static void alpha_sa_mask PROTO((unsigned long *imaskP,
unsigned long *fmaskP));
+#endif
/* Get the number of args of a function in one of two ways. */
#ifdef OPEN_VMS
#define NUM_ARGS current_function_args_info.num_args
@@ -536,6 +538,9 @@ some_operand (op, mode)
case SUBREG:
return some_operand (SUBREG_REG (op), VOIDmode);
+
+ default:
+ break;
}
return 0;
@@ -578,6 +583,9 @@ input_operand (op, mode)
case CONST_INT:
return mode == QImode || mode == HImode || add_operand (op, mode);
+
+ default:
+ break;
}
return 0;
@@ -657,6 +665,9 @@ signed_comparison_operator (op, mode)
{
case EQ: case NE: case LE: case LT: case GE: case GT:
return 1;
+
+ default:
+ break;
}
return 0;
@@ -673,6 +684,9 @@ divmod_operator (op, mode)
{
case DIV: case MOD: case UDIV: case UMOD:
return 1;
+
+ default:
+ break;
}
return 0;
@@ -891,6 +905,9 @@ alpha_set_memflags_1 (x, in_struct_p, volatile_p, unchanging_p)
MEM_VOLATILE_P (x) = volatile_p;
RTX_UNCHANGING_P (x) = unchanging_p;
break;
+
+ default:
+ break;
}
}
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index e4a0dcd5bff..0a68df4c3e1 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -28,13 +28,17 @@ Written by Per Bothner 1994. */
#include "cpplib.h"
extern char *xmalloc PARAMS ((unsigned));
-extern char *xrealloc PARAMS ((char *, unsigned));
+extern char *xrealloc PARAMS ((void *, unsigned));
#ifdef MULTIBYTE_CHARS
#include <stdlib.h>
#include <locale.h>
#endif
+#if HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
#include <stdio.h>
/* This is used for communicating lists of keywords with cccp.c. */
@@ -126,16 +130,34 @@ static long right_shift ();
#define SKIP_OPERAND 8
/*#define UNSIGNEDP 16*/
-#ifndef HOST_BITS_PER_WIDE_INT
+/* Find the largest host integer type and set its size and type.
+ Watch out: on some crazy hosts `long' is shorter than `int'. */
+
+#ifndef HOST_WIDE_INT
+# if HAVE_INTTYPES_H
+# include <inttypes.h>
+# define HOST_WIDE_INT intmax_t
+# else
+# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT \
+ && HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
+# define HOST_WIDE_INT int
+# else
+# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG \
+ || ! (defined LONG_LONG_MAX || defined LLONG_MAX))
+# define HOST_WIDE_INT long
+# else
+# define HOST_WIDE_INT long long
+# endif
+# endif
+# endif
+#endif
-#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
-#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
-#define HOST_WIDE_INT long
-#else
-#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
-#define HOST_WIDE_INT int
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
#endif
+#ifndef HOST_BITS_PER_WIDE_INT
+#define HOST_BITS_PER_WIDE_INT (CHAR_BIT * sizeof (HOST_WIDE_INT))
#endif
struct operation {
@@ -226,7 +248,7 @@ parse_number (pfile, start, olen)
if (largest_digit < digit)
largest_digit = digit;
nd = n * base + digit;
- overflow |= ULONG_MAX_over_base < n | nd < n;
+ overflow |= ULONG_MAX_over_base < n || nd < n;
n = nd;
}
@@ -367,7 +389,7 @@ cpp_lex (pfile, skip_evaluation)
{
if (c == '\\')
{
- c = cpp_parse_escape (pfile, &ptr);
+ c = cpp_parse_escape (pfile, (char **) &ptr);
if (width < HOST_BITS_PER_INT
&& (unsigned) c >= (1 << width))
cpp_pedwarn (pfile,
@@ -406,7 +428,7 @@ cpp_lex (pfile, skip_evaluation)
{
int num_bits = num_chars * width;
- if (cpp_lookup (pfile, "__CHAR_UNSIGNED__",
+ if (cpp_lookup (pfile, (U_CHAR *)"__CHAR_UNSIGNED__",
sizeof ("__CHAR_UNSIGNED__")-1, -1)
|| ((result >> (num_bits - 1)) & 1) == 0)
op.value
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index c8ee89c7ccb..c93c3eadf18 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -257,7 +257,7 @@ extern int emit_lineno;
static rtx make_jump_insn_raw PROTO((rtx));
static rtx make_call_insn_raw PROTO((rtx));
-static rtx find_line_node PROTO((rtx));
+static rtx find_line_note PROTO((rtx));
/* rtx gen_rtx (code, mode, [element1, ..., elementn])
**
diff --git a/gcc/final.c b/gcc/final.c
index 7faaf2d7285..924c29b34d8 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -277,7 +277,9 @@ static struct bb_str *sbb_head = 0; /* Head of string list. */
static struct bb_str **sbb_tail = &sbb_head; /* Ptr to store next bb str */
static int sbb_label_num = 0; /* Last label used */
+#ifdef HAVE_ATTR_length
static int asm_insn_count PROTO((rtx));
+#endif
static void profile_function PROTO((FILE *));
static void profile_after_prologue PROTO((FILE *));
static void add_bb PROTO((FILE *));
diff --git a/gcc/flow.c b/gcc/flow.c
index 1c755281499..69c7d6b4805 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -263,10 +263,12 @@ static void mark_set_regs PROTO((regset, regset, rtx,
rtx, regset));
static void mark_set_1 PROTO((regset, regset, rtx,
rtx, regset));
+#ifdef AUTO_INC_DEC
static void find_auto_inc PROTO((regset, rtx, rtx));
-static void mark_used_regs PROTO((regset, regset, rtx, int, rtx));
static int try_pre_increment_1 PROTO((rtx));
static int try_pre_increment PROTO((rtx, rtx, HOST_WIDE_INT));
+#endif
+static void mark_used_regs PROTO((regset, regset, rtx, int, rtx));
void dump_flow_info PROTO((FILE *));
/* Find basic blocks of the current function and perform data flow analysis.
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index adcb1877d83..4a32656d83b 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1519,7 +1519,7 @@ fold_convert (t, arg1)
= (TREE_OVERFLOW (arg1)
|| (force_fit_type (t,
(TREE_INT_CST_HIGH (arg1) < 0
- & (TREE_UNSIGNED (type)
+ && (TREE_UNSIGNED (type)
< TREE_UNSIGNED (TREE_TYPE (arg1)))))
&& TREE_CODE (TREE_TYPE (arg1)) != POINTER_TYPE));
TREE_CONSTANT_OVERFLOW (t)
@@ -5391,6 +5391,8 @@ fold (expr)
arg0),
convert (signed_type (TREE_TYPE (arg1)),
integer_zero_node)));
+ default:
+ break;
}
}
}
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h
index 59d802ccaed..02bf917765f 100644
--- a/gcc/gcov-io.h
+++ b/gcc/gcov-io.h
@@ -33,10 +33,10 @@ static int
__store_long (value, dest, bytes)
long value;
char *dest;
- int bytes;
+ size_t bytes;
{
int upper_bit = (value < 0 ? 128 : 0);
- int i;
+ size_t i;
if (value < 0)
{
@@ -100,7 +100,7 @@ static int
__write_long (value, file, bytes)
long value;
FILE *file;
- int bytes;
+ size_t bytes;
{
char c[10];
@@ -123,7 +123,7 @@ static int
__read_long (dest, file, bytes)
long *dest;
FILE *file;
- int bytes;
+ size_t bytes;
{
char c[10];
diff --git a/gcc/gcov.c b/gcc/gcov.c
index b3ad330b42c..69f0f56d706 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -2,7 +2,7 @@
source file.
Copyright (C) 1990, 91, 92, 93, 94, 96, 1997 Free Software Foundation, Inc.
Contributed by James E. Wilson of Cygnus Support.
- Mongled by Bob Manson of Cygnus Support.
+ Mangled by Bob Manson of Cygnus Support.
Gcov is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,17 +41,29 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
is no way to get the total execution counts for the included file, can
only get execution counts for one or the other of the including files. */
+#include "config.h"
#include <stdio.h>
+#include "gansidecl.h"
#include <sys/types.h>
#include <sys/stat.h>
-/* The only need for this is so that we get macro definitions for rindex
- if necessary. */
-#include "config.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#include "gcov-io.h"
-extern char * rindex ();
+#ifdef NEED_DECLARATION_RINDEX
+extern char *rindex ();
+#endif
/* The .bb file format consists of several lists of 4-byte integers
which are the line numbers of each basic block in the file. Each
@@ -686,7 +698,7 @@ read_files ()
struct stat buf;
struct bb_info_list *list_end = 0;
struct bb_info_list *b_ptr;
- long total, first_time;
+ long total;
/* Read and ignore the first word of the .da file, which is the count of
how many numbers follow. */
@@ -706,7 +718,7 @@ read_files ()
/* Read in the data in the .bbg file and reconstruct the program flow
graph for one function. */
- create_program_flow_graph (b_ptr, first_time);
+ create_program_flow_graph (b_ptr);
/* Set the EOF condition if at the end of file. */
ungetc (getc (bbg_file), bbg_file);
@@ -734,7 +746,7 @@ read_files ()
stat (bb_file_name, &buf);
bb_data_size = buf.st_size / 4;
- bb_data = (char *) xmalloc (buf.st_size);
+ bb_data = (char *) xmalloc ((unsigned) buf.st_size);
fread (bb_data, sizeof (char), buf.st_size, bb_file);
fclose (bb_file);
@@ -750,7 +762,7 @@ read_files ()
static void
scan_for_source_files ()
{
- struct sourcefile *s_ptr;
+ struct sourcefile *s_ptr = NULL;
char *ptr;
int count;
long line_num;
@@ -901,7 +913,7 @@ static void
function_summary ()
{
if (function_source_lines)
- fprintf (stdout, "%6.2lf%% of %d source lines executed in function %s\n",
+ fprintf (stdout, "%6.2f%% of %d source lines executed in function %s\n",
(((double) function_source_lines_executed / function_source_lines)
* 100), function_source_lines, function_name);
else
@@ -912,18 +924,18 @@ function_summary ()
{
if (function_branches)
{
- fprintf (stdout, "%6.2lf%% of %d branches executed in funcion %s\n",
+ fprintf (stdout, "%6.2f%% of %d branches executed in function %s\n",
(((double) function_branches_executed / function_branches)
* 100), function_branches, function_name);
fprintf (stdout,
- "%6.2lf%% of %d branches taken at least once in function %s\n",
+ "%6.2f%% of %d branches taken at least once in function %s\n",
(((double) function_branches_taken / function_branches)
* 100), function_branches, function_name);
}
else
fprintf (stdout, "No branches in function %s\n", function_name);
if (function_calls)
- fprintf (stdout, "%6.2lf%% of %d calls executed in function %s\n",
+ fprintf (stdout, "%6.2f%% of %d calls executed in function %s\n",
(((double) function_calls_executed / function_calls)
* 100), function_calls, function_name);
else
@@ -949,7 +961,7 @@ output_data ()
char *line_exists;
/* An array indexed by line number, which contains a list of branch
probabilities, one for each branch on that line. */
- struct arcdata **branch_probs;
+ struct arcdata **branch_probs = NULL;
struct sourcefile *s_ptr;
char *source_file_name;
FILE *source_file;
@@ -958,7 +970,7 @@ output_data ()
char *cptr;
long block_num;
long line_num;
- long last_line_num;
+ long last_line_num = 0;
int i;
struct arcdata *a_ptr;
/* Buffer used for reading in lines from the source file. */
@@ -1061,7 +1073,7 @@ output_data ()
fprintf (stderr,
"didn't use all bb entries of graph, function %s\n",
function_name);
- fprintf (stderr, "block_num = %d, num_blocks = %d\n",
+ fprintf (stderr, "block_num = %ld, num_blocks = %d\n",
block_num, current_graph->num_blocks);
}
@@ -1176,7 +1188,7 @@ output_data ()
if (total_source_lines)
fprintf (stdout,
- "%6.2lf%% of %d source lines executed in file %s\n",
+ "%6.2f%% of %d source lines executed in file %s\n",
(((double) total_source_lines_executed / total_source_lines)
* 100), total_source_lines, source_file_name);
else
@@ -1187,18 +1199,18 @@ output_data ()
{
if (total_branches)
{
- fprintf (stdout, "%6.2lf%% of %d branches executed in file %s\n",
+ fprintf (stdout, "%6.2f%% of %d branches executed in file %s\n",
(((double) total_branches_executed / total_branches)
* 100), total_branches, source_file_name);
fprintf (stdout,
- "%6.2lf%% of %d branches taken at least once in file %s\n",
+ "%6.2f%% of %d branches taken at least once in file %s\n",
(((double) total_branches_taken / total_branches)
* 100), total_branches, source_file_name);
}
else
fprintf (stdout, "No branches in file %s\n", source_file_name);
if (total_calls)
- fprintf (stdout, "%6.2lf%% of %d calls executed in file %s\n",
+ fprintf (stdout, "%6.2f%% of %d calls executed in file %s\n",
(((double) total_calls_executed / total_calls)
* 100), total_calls, source_file_name);
else
@@ -1208,7 +1220,7 @@ output_data ()
if (output_gcov_file)
{
/* Now the statistics are ready. Read in the source file one line
- at a time, and output that line to the gcov file preceeded by
+ at a time, and output that line to the gcov file preceded by
its execution count if non zero. */
source_file = fopen (source_file_name, "r");
@@ -1285,12 +1297,12 @@ output_data ()
before the source line. For lines which exist but were never
executed, print ###### before the source line. Otherwise,
print the execution count before the source line. */
- /* There are 16 spaces of identation added before the source line
- so that tabs won't be messed up. */
+ /* There are 16 spaces of indentation added before the source
+ line so that tabs won't be messed up. */
if (line_exists[count])
{
if (line_counts[count])
- fprintf (gcov_file, "%12d %s", line_counts[count],
+ fprintf (gcov_file, "%12ld %s", line_counts[count],
string);
else
fprintf (gcov_file, " ###### %s", string);
@@ -1299,7 +1311,7 @@ output_data ()
fprintf (gcov_file, "\t\t%s", string);
/* In case the source file line is larger than our buffer, keep
- reading and outputing lines until we get a newline. */
+ reading and outputting lines until we get a newline. */
len = strlen (string);
while ((len == 0 || string[strlen (string) - 1] != '\n')
&& retval != NULL)
@@ -1356,7 +1368,7 @@ output_data ()
fprintf (gcov_file, "\t\t%s", string);
/* In case the source file line is larger than our buffer, keep
- reading and outputing lines until we get a newline. */
+ reading and outputting lines until we get a newline. */
len = strlen (string);
while ((len == 0 || string[strlen (string) - 1] != '\n')
&& retval != NULL)
diff --git a/gcc/genemit.c b/gcc/genemit.c
index e80e4c71668..4b8485242a3 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -1,5 +1,5 @@
/* Generate code from machine description to emit insns as rtl.
- Copyright (C) 1987, 1988, 1991, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 91, 94, 95, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -225,6 +225,9 @@ gen_exp (x)
/* These shouldn't be written in MD files. Instead, the appropriate
routines in varasm.c should be called. */
abort ();
+
+ default:
+ break;
}
printf ("gen_rtx (");
@@ -743,9 +746,11 @@ main (argc, argv)
from the machine description file `md'. */\n\n");
printf ("#include \"config.h\"\n");
+ printf ("#include <stdio.h>\n");
printf ("#include \"rtl.h\"\n");
printf ("#include \"expr.h\"\n");
printf ("#include \"real.h\"\n");
+ printf ("#include \"flags.h\"\n");
printf ("#include \"output.h\"\n");
printf ("#include \"insn-config.h\"\n\n");
printf ("#include \"insn-flags.h\"\n\n");
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index b7aade256dc..3235172b4e4 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -628,6 +628,9 @@ contains_replace_regs (x, reg_equiv_replace)
case REG:
return reg_equiv_replace[REGNO (x)];
+
+ default:
+ break;
}
fmt = GET_RTX_FORMAT (code);
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 7d9edd26e96..16f886ed41e 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -587,7 +587,9 @@ static void record_reg_classes PROTO((int, int, rtx *, enum machine_mode *,
static int copy_cost PROTO((rtx, enum machine_mode,
enum reg_class, int));
static void record_address_regs PROTO((rtx, enum reg_class, int));
-static auto_inc_dec_reg_p PROTO((rtx, enum machine_mode));
+#ifdef FORBIDDEN_INC_DEC_CLASSES
+static int auto_inc_dec_reg_p PROTO((rtx, enum machine_mode));
+#endif
static void reg_scan_mark_refs PROTO((rtx, rtx, int));
/* Return the reg_class in which pseudo reg number REGNO is best allocated.
@@ -1635,7 +1637,7 @@ record_address_regs (x, class, scale)
/* Return 1 if REG is valid as an auto-increment memory reference
to an object of MODE. */
-static
+static int
auto_inc_dec_reg_p (reg, mode)
rtx reg;
enum machine_mode mode;
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 3cfa1f88498..778801dc69b 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -8273,7 +8273,7 @@ reload_cse_simplify_operands (insn)
n_alternatives = insn_n_alternatives[insn_code_number];
if (n_alternatives == 0 || n_operands == 0)
- return;
+ return 0;
insn_extract (insn);
/* Figure out which alternative currently matches. */
diff --git a/gcc/rtl.c b/gcc/rtl.c
index 69e517143db..063ce79489d 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -22,6 +22,9 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include <ctype.h>
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "rtl.h"
#include "real.h"
@@ -491,7 +494,7 @@ read_skip_spaces (infile)
FILE *infile;
{
register int c;
- while (c = getc (infile))
+ while ((c = getc (infile)))
{
if (c == ' ' || c == '\n' || c == '\t' || c == '\f')
;
@@ -507,7 +510,7 @@ read_skip_spaces (infile)
dump_and_abort ('*', c, infile);
prevc = 0;
- while (c = getc (infile))
+ while ((c = getc (infile)))
{
if (prevc == '*' && c == '/')
break;
@@ -662,7 +665,7 @@ read_rtx (infile)
case 'E':
{
register struct rtx_list *next_rtx, *rtx_list_link;
- struct rtx_list *list_rtx;
+ struct rtx_list *list_rtx = NULL_RTX;
c = read_skip_spaces (infile);
if (c != '[')
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index d311652d2ef..bff2b6ea2e8 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1922,6 +1922,9 @@ jmp_uses_reg_or_mem (x)
case PLUS: case MINUS: case MULT:
return (jmp_uses_reg_or_mem (XEXP (x, 0))
|| jmp_uses_reg_or_mem (XEXP (x, 1)));
+
+ default:
+ break;
}
fmt = GET_RTX_FORMAT (code);
diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c
index 253f3fc22b3..00dc83869ac 100644
--- a/gcc/scan-decls.c
+++ b/gcc/scan-decls.c
@@ -1,5 +1,5 @@
/* scan-decls.c - Extracts declarations from cpp output.
- Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -81,6 +81,7 @@ scan_decls (pfile, argc, argv)
char **argv;
{
int saw_extern, saw_inline;
+ int start_written;
int old_written;
/* If declarator_start is non-zero, it marks the start of the current
declarator. If it is zero, we are either still parsing the
@@ -91,6 +92,7 @@ scan_decls (pfile, argc, argv)
new_statement:
CPP_SET_WRITTEN (pfile, 0);
+ start_written = 0;
token = cpp_get_token (pfile);
handle_statement:
@@ -122,9 +124,6 @@ scan_decls (pfile, argc, argv)
declarator_start = 0;
for (;;)
{
- int start_written = CPP_WRITTEN (pfile);
- token = cpp_get_token (pfile);
- handle_token:
switch (token)
{
case CPP_LPAREN:
@@ -225,7 +224,7 @@ scan_decls (pfile, argc, argv)
}
}
else
- goto handle_token;
+ continue;
break;
}
/* This may be the name of a variable or function. */
@@ -234,7 +233,7 @@ scan_decls (pfile, argc, argv)
break;
case CPP_EOF:
- return; /* ??? FIXME */
+ return 0;
case CPP_LBRACE: case CPP_RBRACE: case CPP_DIRECTIVE:
goto new_statement; /* handle_statement? */
@@ -248,5 +247,8 @@ scan_decls (pfile, argc, argv)
default:
prev_id_start = 0;
}
+
+ start_written = CPP_WRITTEN (pfile);
+ token = cpp_get_token (pfile);
}
}
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 14c5b40dc32..d95945e635b 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -114,7 +114,7 @@ static void sdbout_syms PROTO((tree));
static void sdbout_queue_anonymous_type PROTO((tree));
static void sdbout_dequeue_anonymous_types PROTO((void));
static void sdbout_type PROTO((tree));
-static void sbdout_field_types PROTO((tree));
+static void sdbout_field_types PROTO((tree));
static void sdbout_one_type PROTO((tree));
static void sdbout_parms PROTO((tree));
static void sdbout_reg_parms PROTO((tree));
@@ -951,6 +951,9 @@ sdbout_symbol (decl, local)
return;
}
break;
+
+ default:
+ break;
}
PUT_SDB_TYPE (plain_type (type));
PUT_SDB_ENDEF;
@@ -1166,6 +1169,9 @@ sdbout_one_type (type)
PUT_SDB_TYPE (T_ENUM);
member_scl = C_MOE;
break;
+
+ default:
+ break;
}
PUT_SDB_SIZE (size);
@@ -1258,6 +1264,9 @@ sdbout_one_type (type)
PUT_SDB_SIZE (size);
PUT_SDB_ENDEF;
break;
+
+ default:
+ break;
}
}
}