summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-17 20:26:29 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-17 20:26:29 +0000
commitba1c8484dd9f158c58d0572f7d77a50d721bedaa (patch)
tree15838ddf2fc3b9a91598b7edfce12e6d16b40cd4 /gcc
parent346db3f737ef406fe269082639e42ee9af67482e (diff)
downloadgcc-ba1c8484dd9f158c58d0572f7d77a50d721bedaa.tar.gz
Warning fixes:
* Makefile.in (flow.o): Depend on recog.h. * cpplib.h (directive_table): Add missing initializiers. (finclude): Change type of variable `bsize' to size_t. * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED. * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE. * fix-header.c (lookup_std_proto): Cast the result of `strlen' to `int' when comparing against one. (cpp_file_line_for_message): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * flow.c: Include recog.h. (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR). * function.c (thread_prologue_and_epilogue_insns): Mark parameter `f' with ATTRIBUTE_UNUSED. (reposition_prologue_and_epilogue_notes): Likewise. * genopinit.c (gen_insn): Cast argument of ctype functions to `unsigned char'. * haifa-sched.c: Include recog.h. (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when comparing against one. * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now. * mips-tfile.c (parse_end): Cast the argument of ctype function to `unsigned char'. (parse_ent): Likewise. (parse_input): Likewise. * optabs.c (init_libfuncs): Likewise. * protoize.c (find_rightmost_formals_list): Likewise. * recog.h (const_double_operand): Fix typo in prototype. * tlink.c (scan_linker_output): Cast the argument of ctype function to `unsigned char'. * toplev.c (check_lang_option): Cast the result of `strlen' to `int' when comparing against one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog50
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/cpplib.c16
-rw-r--r--gcc/cse.c2
-rw-r--r--gcc/dwarfout.h2
-rw-r--r--gcc/fix-header.c6
-rw-r--r--gcc/flow.c3
-rw-r--r--gcc/function.c4
-rw-r--r--gcc/genopinit.c8
-rw-r--r--gcc/haifa-sched.c3
-rw-r--r--gcc/libgcc2.c2
-rw-r--r--gcc/mips-tfile.c10
-rw-r--r--gcc/optabs.c2
-rw-r--r--gcc/protoize.c4
-rw-r--r--gcc/recog.h2
-rw-r--r--gcc/tlink.c4
-rw-r--r--gcc/toplev.c2
17 files changed, 88 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3f75ab89b5b..62a23cf21b3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,53 @@
+Sat Oct 17 23:18:08 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (flow.o): Depend on recog.h.
+
+ * cpplib.h (directive_table): Add missing initializiers.
+ (finclude): Change type of variable `bsize' to size_t.
+
+ * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED.
+
+ * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE.
+
+ * fix-header.c (lookup_std_proto): Cast the result of `strlen' to
+ `int' when comparing against one.
+ (cpp_file_line_for_message): Mark parameter `pfile' with
+ ATTRIBUTE_UNUSED.
+ (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
+
+ * flow.c: Include recog.h.
+ (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR).
+
+ * function.c (thread_prologue_and_epilogue_insns): Mark parameter
+ `f' with ATTRIBUTE_UNUSED.
+ (reposition_prologue_and_epilogue_notes): Likewise.
+
+ * genopinit.c (gen_insn): Cast argument of ctype functions to
+ `unsigned char'.
+
+ * haifa-sched.c: Include recog.h.
+ (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when
+ comparing against one.
+
+ * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now.
+
+ * mips-tfile.c (parse_end): Cast the argument of ctype function to
+ `unsigned char'.
+ (parse_ent): Likewise.
+ (parse_input): Likewise.
+
+ * optabs.c (init_libfuncs): Likewise.
+
+ * protoize.c (find_rightmost_formals_list): Likewise.
+
+ * recog.h (const_double_operand): Fix typo in prototype.
+
+ * tlink.c (scan_linker_output): Cast the argument of ctype
+ function to `unsigned char'.
+
+ * toplev.c (check_lang_option): Cast the result of `strlen' to
+ `int' when comparing against one.
+
Sat Oct 17 13:09:09 1998 Graham <grahams@rcp.co.uk>
* gcse.c (dump_cuid_table): Correct typo.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 7d01d8b6ead..6ceb1328899 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1477,7 +1477,7 @@ loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
integrate.h $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h
flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \
- $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h
+ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h recog.h
combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h \
insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \
$(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 016b1606211..b45e014351d 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -377,7 +377,7 @@ static int do_warning PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHA
The initialize_builtins function assumes #define is the very first. */
static struct directive directive_table[] = {
- { 6, do_define, "define", T_DEFINE},
+ { 6, do_define, "define", T_DEFINE, 0},
{ 5, do_xifdef, "ifdef", T_IFDEF, 1},
{ 6, do_xifdef, "ifndef", T_IFNDEF, 1},
{ 7, do_include, "include", T_INCLUDE, 1},
@@ -387,18 +387,18 @@ static struct directive directive_table[] = {
{ 4, do_else, "else", T_ELSE, 1},
{ 2, do_if, "if", T_IF, 1},
{ 4, do_elif, "elif", T_ELIF, 1},
- { 5, do_undef, "undef", T_UNDEF},
- { 5, do_error, "error", T_ERROR},
- { 7, do_warning, "warning", T_WARNING},
- { 6, do_pragma, "pragma", T_PRAGMA},
+ { 5, do_undef, "undef", T_UNDEF, 0},
+ { 5, do_error, "error", T_ERROR, 0},
+ { 7, do_warning, "warning", T_WARNING, 0},
+ { 6, do_pragma, "pragma", T_PRAGMA, 0},
{ 4, do_line, "line", T_LINE, 1},
{ 5, do_ident, "ident", T_IDENT, 1},
#ifdef SCCS_DIRECTIVE
- { 4, do_sccs, "sccs", T_SCCS},
+ { 4, do_sccs, "sccs", T_SCCS, 0},
#endif
{ 6, do_assert, "assert", T_ASSERT, 1},
{ 8, do_unassert, "unassert", T_UNASSERT, 1},
- { -1, 0, "", T_UNUSED},
+ { -1, 0, "", T_UNUSED, 0},
};
/* table to tell if char can be part of a C identifier. */
@@ -5642,7 +5642,7 @@ finclude (pfile, f, fname, system_header_p, dirptr)
First read the entire file into heap and
copy them into buffer on stack. */
- int bsize = 2000;
+ size_t bsize = 2000;
st_size = 0;
fp->buf = (U_CHAR *) xmalloc (bsize + 2);
diff --git a/gcc/cse.c b/gcc/cse.c
index 7e64ef305f2..8fb473af57e 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -702,7 +702,7 @@ notreg_cost (x)
int
rtx_cost (x, outer_code)
rtx x;
- enum rtx_code outer_code;
+ enum rtx_code outer_code ATTRIBUTE_UNUSED;
{
register int i, j;
register enum rtx_code code;
diff --git a/gcc/dwarfout.h b/gcc/dwarfout.h
index b4bb9b9fc16..29c8dd39d5f 100644
--- a/gcc/dwarfout.h
+++ b/gcc/dwarfout.h
@@ -35,6 +35,8 @@ extern void dwarfout_end_epilogue PROTO ((void));
extern void dwarfout_begin_block PROTO ((unsigned));
extern void dwarfout_end_block PROTO ((unsigned));
+#ifdef RTX_CODE
extern void dwarfout_label PROTO ((rtx));
+#endif
extern void dwarfout_line PROTO ((char *, unsigned));
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
index ffeede58362..e1a9956a18c 100644
--- a/gcc/fix-header.c
+++ b/gcc/fix-header.c
@@ -397,7 +397,7 @@ lookup_std_proto (name, name_length)
if (hash_tab[i] == 0)
return NULL;
fn = &std_protos[hash_tab[i]];
- if (strlen (fn->fname) == name_length
+ if ((int) strlen (fn->fname) == name_length
&& strncmp (fn->fname, name, name_length) == 0)
return fn;
i = (i+1) % HASH_SIZE;
@@ -1326,7 +1326,7 @@ main (argc, argv)
void
cpp_file_line_for_message (pfile, filename, line, column)
- cpp_reader * pfile;
+ cpp_reader * pfile ATTRIBUTE_UNUSED;
char *filename;
int line, column;
{
@@ -1418,7 +1418,7 @@ fatal VPROTO ((const char *str, ...))
}
void
-cpp_fatal VPROTO ((cpp_reader * pfile, const char *str, ...))
+cpp_fatal VPROTO ((cpp_reader * pfile ATTRIBUTE_UNUSED, const char *str, ...))
{
#ifndef __STDC__
cpp_reader * pfile;
diff --git a/gcc/flow.c b/gcc/flow.c
index 10f9c07344d..8bc8a110ba0 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -122,6 +122,7 @@ Boston, MA 02111-1307, USA. */
#include "output.h"
#include "except.h"
#include "toplev.h"
+#include "recog.h"
#include "obstack.h"
#define obstack_chunk_alloc xmalloc
@@ -3687,7 +3688,7 @@ void
sbitmap_copy (dst, src)
sbitmap dst, src;
{
- bcopy (src->elms, dst->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size);
+ bcopy ((PTR) src->elms, (PTR) dst->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size);
}
/* Zero all elements in a bitmap. */
diff --git a/gcc/function.c b/gcc/function.c
index b209b131164..e594e7000f5 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6183,7 +6183,7 @@ contains (insn, vec)
void
thread_prologue_and_epilogue_insns (f)
- rtx f;
+ rtx f ATTRIBUTE_UNUSED;
{
#ifdef HAVE_prologue
if (HAVE_prologue)
@@ -6284,7 +6284,7 @@ thread_prologue_and_epilogue_insns (f)
void
reposition_prologue_and_epilogue_notes (f)
- rtx f;
+ rtx f ATTRIBUTE_UNUSED;
{
#if defined (HAVE_prologue) || defined (HAVE_epilogue)
/* Reposition the prologue and epilogue notes. */
diff --git a/gcc/genopinit.c b/gcc/genopinit.c
index c8d7859e978..066a0550708 100644
--- a/gcc/genopinit.c
+++ b/gcc/genopinit.c
@@ -202,7 +202,7 @@ gen_insn (insn)
for (i = ((int) MAX_MACHINE_MODE) - 1; i >= 0; i--)
{
for (p = mode_name[i], q = np; *p; p++, q++)
- if (tolower (*p) != *q)
+ if (tolower ((unsigned char)*p) != *q)
break;
if (*p == 0
@@ -256,11 +256,11 @@ gen_insn (insn)
break;
case 'a':
for (np = mode_name[m1]; *np; np++)
- printf ("%c", tolower (*np));
+ printf ("%c", tolower ((unsigned char)*np));
break;
case 'b':
for (np = mode_name[m2]; *np; np++)
- printf ("%c", tolower (*np));
+ printf ("%c", tolower ((unsigned char)*np));
break;
case 'A':
printf ("%smode", mode_name[m1]);
@@ -273,7 +273,7 @@ gen_insn (insn)
break;
case 'C':
for (np = rtx_name[op]; *np; np++)
- printf ("%c", toupper (*np));
+ printf ("%c", toupper ((unsigned char)*np));
break;
}
}
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index f529a958cd4..806bb396d88 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -166,6 +166,7 @@
#include "insn-attr.h"
#include "except.h"
#include "toplev.h"
+#include "recog.h"
extern char *reg_known_equiv_p;
extern rtx *reg_known_value;
@@ -2858,7 +2859,7 @@ blockage_range (unit, insn)
unsigned int blockage = INSN_BLOCKAGE (insn);
unsigned int range;
- if (UNIT_BLOCKED (blockage) != unit + 1)
+ if ((int) UNIT_BLOCKED (blockage) != unit + 1)
{
range = function_units[unit].blockage_range_function (insn);
/* We only cache the blockage range for one unit and then only if
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 09e3c7143ea..d519f238dda 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -3637,7 +3637,7 @@ next_stack_level (void *pc, frame_state *udata, frame_state *caller_udata)
If we find one, then we unwind the frames down to the one that
has the handler and transfer control into the handler. */
-extern void __throw(void) __attribute__ ((__noreturn__));
+/*extern void __throw(void) __attribute__ ((__noreturn__));*/
void
__throw ()
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c
index 0922bf1ad14..c1407703077 100644
--- a/gcc/mips-tfile.c
+++ b/gcc/mips-tfile.c
@@ -3472,7 +3472,7 @@ parse_end (start)
}
/* Get the function name, skipping whitespace. */
- for (start_func = start; ISSPACE (*start_func); start_func++)
+ for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++)
;
ch = *start_func;
@@ -3531,7 +3531,7 @@ parse_ent (start)
return;
}
- for (start_func = start; ISSPACE (*start_func); start_func++)
+ for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++)
;
ch = *start_func;
@@ -3871,16 +3871,16 @@ parse_input __proto((void))
while ((p = read_line ()) != (char *) 0)
{
/* Skip leading blanks */
- while (ISSPACE (*p))
+ while (ISSPACE ((unsigned char)*p))
p++;
/* See if it's a directive we handle. If so, dispatch handler. */
for (i = 0; i < sizeof (pseudo_ops) / sizeof (pseudo_ops[0]); i++)
if (memcmp (p, pseudo_ops[i].name, pseudo_ops[i].len) == 0
- && ISSPACE (p[pseudo_ops[i].len]))
+ && ISSPACE ((unsigned char)(p[pseudo_ops[i].len])))
{
p += pseudo_ops[i].len; /* skip to first argument */
- while (ISSPACE (*p))
+ while (ISSPACE ((unsigned char)*p))
p++;
(*pseudo_ops[i].func)( p );
diff --git a/gcc/optabs.c b/gcc/optabs.c
index f4095c82bde..801b8535dd1 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -4034,7 +4034,7 @@ init_libfuncs (optable, first_mode, last_mode, opname, suffix)
for (q = opname; *q; )
*p++ = *q++;
for (q = mname; *q; q++)
- *p++ = tolower (*q);
+ *p++ = tolower ((unsigned char)*q);
*p++ = suffix;
*p++ = '\0';
optable->handlers[(int) mode].libfunc
diff --git a/gcc/protoize.c b/gcc/protoize.c
index 3ba8b96be8b..18187a6c9cd 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -3447,8 +3447,8 @@ find_rightmost_formals_list (clean_text_p)
while (*end_formals != ')')
{
- if (ISSPACE (*end_formals))
- while (ISSPACE (*end_formals))
+ if (ISSPACE ((unsigned char)*end_formals))
+ while (ISSPACE ((unsigned char)*end_formals))
check_source (--end_formals > clean_read_ptr, 0);
else
check_source (--end_formals > clean_read_ptr, 0);
diff --git a/gcc/recog.h b/gcc/recog.h
index 195efe39264..1bf77b4d0fc 100644
--- a/gcc/recog.h
+++ b/gcc/recog.h
@@ -44,7 +44,7 @@ extern int register_operand PROTO((rtx, enum machine_mode));
extern int scratch_operand PROTO((rtx, enum machine_mode));
extern int immediate_operand PROTO((rtx, enum machine_mode));
extern int const_int_operand PROTO((rtx, enum machine_mode));
-extern int cosnt_double_operand PROTO((rtx, enum machine_mode));
+extern int const_double_operand PROTO((rtx, enum machine_mode));
extern int nonimmediate_operand PROTO((rtx, enum machine_mode));
extern int nonmemory_operand PROTO((rtx, enum machine_mode));
extern int push_operand PROTO((rtx, enum machine_mode));
diff --git a/gcc/tlink.c b/gcc/tlink.c
index a4c5b5311cd..0ec3f9a1064 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -530,13 +530,13 @@ scan_linker_output (fname)
symbol *sym;
int end;
- while (*p && ISSPACE (*p))
+ while (*p && ISSPACE ((unsigned char)*p))
++p;
if (! *p)
continue;
- for (q = p; *q && ! ISSPACE (*q); ++q)
+ for (q = p; *q && ! ISSPACE ((unsigned char)*q); ++q)
;
/* Try the first word on the line. */
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 7d866d694ff..8ad8eebc073 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -4179,7 +4179,7 @@ check_lang_option (option, lang_option)
-fpack-struct. */
/* An exact match is OK */
- if (strlen (option) == len)
+ if ((int) strlen (option) == len)
return 1;
/* If it is not an -f or -W option allow the match */