From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: egcs@cygnus.com
Subject: egcs-19980508 warning patches part 1/5
Date: Tue, 12 May 1998 10:17:00 -0000 [thread overview]
Message-ID: <199805121406.KAA28401@caip.rutgers.edu> (raw)
This is patch part 1/5. Okay to install?
Note: I tried to only use ATTRIBUTE_UNUSED where the function call
interface was mandated by outside constraints. Also, the ChangeLog
is for all parts 1 to 4.
Mon May 11 21:28:22 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h.
(c-lex.o): Depend on output.h.
(c-common.o): Likewise.
(stmt.o): Likewise.
(calls.o): Likewise.
(integrate.o): Depend on toplev.h.
(regclass.o): Depend on output.h.
(final.o): Depend on reload.h.
* c-common.c: Include output.h.
(check_format_info): Remove unused variable `integral_format'.
* c-decl.c (print_lang_decl): Mark parameters `file', `node' and
`indent' with ATTRIBUTE_UNUSED.
(print_lang_type): Likewise.
(maybe_build_cleanup): Likewise for parameter `decl'.
(copy_lang_decl): Likewise for parameter `node'.
* c-lang.c: Include c-tree.h, c-lex.h and toplev.h.
(lang_print_xnode): Mark parameters `file', `node' and `indent'
with ATTRIBUTE_UNUSED.
(lookup_interface): Likewise for parameter `arg'.
(is_class_name): Likewise.
(maybe_objc_check_decl): Likewise for parameter `decl'.
(maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and
`reflexive'.
(maybe_objc_method_name): Likewise for parameter `decl'.
(build_objc_string): Likewise for parameters `len' and `str'.
* c-lex.c: Include output.h.
* c-lex.h (position_after_white_space): Correct typo in prototype.
* c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else,
c_expand_end_cond, init_iterators): Add prototypes.
* caller-save.c (set_reg_live): Mark parameters `reg' and `setter'
with ATTRIBUTE_UNUSED.
* calls.c: Include output.h.
* cccp.c (pipe_closed): Mark parameter `signo' with
ATTRIBUTE_UNUSED.
* combine.c: Move inclusion of expr.h to after insn-config.h.
* iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define
as empty, rather define as ((void)0).
* sparc.c (sparc_check_64): Add braces around ambiguous `else'.
Add parentheses around assignment used as truth value.
* cplus-dem.c (squangle_mop_up): Change return type to void.
(internal_cplus_demangle): Remove unused parameter `options'.
All callers changed.
(cplus_demangle_opname): Remove function wide variable `int i' and
replace with `size_t i' at each location where it is used.
(cplus_demangle_opname): change type of `i' from int to size_t.
* cppexp.c (right_shift): Mark parameter `pfile' with
ATTRIBUTE_UNUSED.
* cpphash.c (cpp_lookup): Likewise.
(cpp_hash_cleanup): Likewise.
* cpplib.c (parse_name): Add a prototype and make it static.
(null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
(null_cleanup): Likewise for parameters `pbuf' and `pfile'.
(macro_cleanup): Likewise for parameter `pfile'.
(file_cleanup): Likewise.
* cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read,
cpp_read_check_assertion, skip_rest_of_line): Add prototypes.
* crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data,
__DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED.
* cse.c (cse_check_loop_start): Mark parameter `set' with
ATTRIBUTE_UNUSED.
* dbxout.c (flag_minimal_debug, have_used_extensions,
source_label_number): Move inside macro wrapper check against
defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO).
* dwarf2out.c (gen_entry_point_die): Hide prototype and definition.
* except.h (doing_eh): Provide prototype.
* expr.c: Move inclusion of expr.h to after insn-config.h.
* final.c: Include reload.h.
(shorten_branches): Cast the first argument of bzero to char *.
* fix-header.c (cpp_print_containing_files): Mark parameter
`pfile' with ATTRIBUTE_UNUSED.
(cpp_fatal): Likewise.
* flow.c (find_basic_blocks_1): Cast the first argument of bzero
to char *.
* genattrtab.c (make_length_attrs): Change the type of variable
`i' from int to size_t.
(zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED.
(one_fn): Likewise.
* genextract.c (main): When generating insn-extract.c, mark
variable `junk' with ATTRIBUTE_UNUSED.
* gengenrtl.c (gencode): When generating genrtl.c, cast the first
argument of bzero to char*.
* integrate.c: Include toplev.h.
* libgcc2.c: Wrap `struct exception_table' and
`find_exception_handler' in macro DWARF2_UNWIND_INFO.
* objc/Make-lang.in (objc-act.o): Depend on toplev.h.
* objc/objc-act.c: Include toplev.h.
(lang_print_xnode): Mark parameters `file', `node' and `indent'
with ATTRIBUTE_UNUSED.
(finish_protocol): Likewise for parameter `protocol'.
* output.h (declare_weak): Add prototype.
(decode_reg_name): Don't wrap with TREE_CODE macro.
(assemble_alias): Add prototype.
* regclass.c: Include output.h.
* reload.h (reloads_conflict): Add prototype.
* rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p,
output_func_start_profiler): Add prototypes.
* rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with
ATTRIBUTE_UNUSED.
* scan-decls.c: Include scan.h.
* scan.h (recognized_function, recognized_extern): Add prototypes.
* stmt.c: Include output.h.
* toplev.c (error_for_asm, warning_for_asm): Remove prototypes.
(output_lang_identify): Hide prototype and definition.
(float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED.
(pipe_closed): Likewise.
* toplev.h (count_error, strip_off_ending, error_for_asm,
warning_for_asm): Add prototypes.
diff -rup orig/egcs-19980508/gcc/Makefile.in egcs-19980508/gcc/Makefile.in
--- orig/egcs-19980508/gcc/Makefile.in Fri May 8 02:51:03 1998
+++ egcs-19980508/gcc/Makefile.in Sun May 10 19:40:43 1998
@@ -1254,9 +1254,10 @@ c-decl.o : c-decl.c $(CONFIG_H) system.h
output.h toplev.h
c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h \
output.h expr.h insn-codes.h $(RTL_H) toplev.h
-c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H)
+c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h toplev.h
c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \
- $(srcdir)/c-parse.h input.h flags.h $(srcdir)/c-gperf.h c-pragma.h toplev.h
+ $(srcdir)/c-parse.h input.h flags.h $(srcdir)/c-gperf.h c-pragma.h \
+ toplev.h output.h
c-aux-info.o : c-aux-info.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h
c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h
c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(TREE_H) except.h function.h \
@@ -1299,7 +1300,7 @@ s-under: $(GCC_PASSES)
# A file used by all variants of C.
c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \
- flags.h toplev.h
+ flags.h toplev.h output.h
# Language-independent files.
@@ -1354,7 +1355,7 @@ function.o : function.c $(CONFIG_H) syst
insn-config.h $(RECOG_H) output.h toplev.h
stmt.o : stmt.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \
insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \
- loop.h $(RECOG_H) toplev.h
+ loop.h $(RECOG_H) toplev.h output.h
except.o : except.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \
insn-config.h $(RECOG_H) output.h except.h toplev.h
@@ -1362,7 +1363,7 @@ expr.o : expr.c $(CONFIG_H) system.h $(R
regs.h insn-flags.h insn-codes.h expr.h insn-config.h $(RECOG_H) output.h \
typeclass.h hard-reg-set.h toplev.h
calls.o : calls.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h expr.h \
- insn-codes.h insn-flags.h regs.h toplev.h
+ insn-codes.h insn-flags.h regs.h toplev.h output.h
expmed.o : expmed.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
insn-flags.h insn-config.h insn-codes.h expr.h $(RECOG_H) real.h
explow.o : explow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
@@ -1389,7 +1390,7 @@ getpwd.o : getpwd.c $(CONFIG_H) system.h
integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
integrate.h insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h \
- function.h output.h $(RECOG_H) except.h
+ function.h output.h $(RECOG_H) except.h toplev.h
jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h regs.h \
insn-config.h insn-codes.h insn-flags.h $(RECOG_H) expr.h real.h except.h
@@ -1409,7 +1410,8 @@ combine.o : combine.c $(CONFIG_H) system
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
regclass.o : regclass.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h flags.h \
- $(BASIC_BLOCK_H) regs.h insn-config.h $(RECOG_H) reload.h real.h toplev.h
+ $(BASIC_BLOCK_H) regs.h insn-config.h $(RECOG_H) reload.h real.h toplev.h \
+ output.h
local-alloc.o : local-alloc.c $(CONFIG_H) system.h $(RTL_H) flags.h \
$(BASIC_BLOCK_H) regs.h hard-reg-set.h insn-config.h $(RECOG_H) output.h
bitmap.o : bitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H) \
@@ -1439,7 +1441,7 @@ $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)
final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h regs.h \
$(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
- toplev.h
+ toplev.h reload.h
recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) \
regs.h $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
insn-flags.h insn-codes.h real.h
diff -rup orig/egcs-19980508/gcc/c-common.c egcs-19980508/gcc/c-common.c
--- orig/egcs-19980508/gcc/c-common.c Wed May 6 17:06:41 1998
+++ egcs-19980508/gcc/c-common.c Sun May 10 18:12:01 1998
@@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "obstack.h"
#include "toplev.h"
+#include "output.h"
#ifndef WCHAR_TYPE_SIZE
#ifdef INT_TYPE_SIZE
@@ -1235,7 +1236,6 @@ check_format_info (info, params)
int length_char;
int format_char;
int format_length;
- int integral_format;
tree format_tree;
tree cur_param;
tree cur_type;
diff -rup orig/egcs-19980508/gcc/c-decl.c egcs-19980508/gcc/c-decl.c
--- orig/egcs-19980508/gcc/c-decl.c Wed May 6 17:06:42 1998
+++ egcs-19980508/gcc/c-decl.c Sun May 10 18:02:39 1998
@@ -808,17 +808,17 @@ c_decode_option (p)
void
print_lang_decl (file, node, indent)
- FILE *file;
- tree node;
- int indent;
+ FILE *file ATTRIBUTE_UNUSED;
+ tree node ATTRIBUTE_UNUSED;
+ int indent ATTRIBUTE_UNUSED;
{
}
void
print_lang_type (file, node, indent)
- FILE *file;
- tree node;
- int indent;
+ FILE *file ATTRIBUTE_UNUSED;
+ tree node ATTRIBUTE_UNUSED;
+ int indent ATTRIBUTE_UNUSED;
{
}
@@ -4083,7 +4083,7 @@ finish_decl (decl, init, asmspec_tree)
tree
maybe_build_cleanup (decl)
- tree decl;
+ tree decl ATTRIBUTE_UNUSED;
{
/* There are no cleanups in C. */
return NULL_TREE;
@@ -7296,6 +7296,6 @@ pop_c_function_context ()
void
copy_lang_decl (node)
- tree node;
+ tree node ATTRIBUTE_UNUSED;
{
}
diff -rup orig/egcs-19980508/gcc/c-lang.c egcs-19980508/gcc/c-lang.c
--- orig/egcs-19980508/gcc/c-lang.c Fri Apr 3 11:33:20 1998
+++ egcs-19980508/gcc/c-lang.c Sun May 10 17:47:41 1998
@@ -23,6 +23,9 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "tree.h"
#include "input.h"
+#include "c-tree.h"
+#include "c-lex.h"
+#include "toplev.h"
/* Each of the functions defined here
is an alternative to a function in objc-actions.c. */
@@ -65,9 +68,9 @@ print_lang_statistics ()
void
lang_print_xnode (file, node, indent)
- FILE *file;
- tree node;
- int indent;
+ FILE *file ATTRIBUTE_UNUSED;
+ tree node ATTRIBUTE_UNUSED;
+ int indent ATTRIBUTE_UNUSED;
{
}
@@ -75,35 +78,36 @@ lang_print_xnode (file, node, indent)
tree
lookup_interface (arg)
- tree arg;
+ tree arg ATTRIBUTE_UNUSED;
{
return 0;
}
tree
is_class_name (arg)
- tree arg;
+ tree arg ATTRIBUTE_UNUSED;
{
return 0;
}
void
maybe_objc_check_decl (decl)
- tree decl;
+ tree decl ATTRIBUTE_UNUSED;
{
}
int
maybe_objc_comptypes (lhs, rhs, reflexive)
- tree lhs, rhs;
- int reflexive;
+ tree lhs ATTRIBUTE_UNUSED;
+ tree rhs ATTRIBUTE_UNUSED;
+ int reflexive ATTRIBUTE_UNUSED;
{
return -1;
}
tree
maybe_objc_method_name (decl)
- tree decl;
+ tree decl ATTRIBUTE_UNUSED;
{
return 0;
}
@@ -122,8 +126,8 @@ recognize_objc_keyword ()
tree
build_objc_string (len, str)
- int len;
- char *str;
+ int len ATTRIBUTE_UNUSED;
+ char *str ATTRIBUTE_UNUSED;
{
abort ();
return NULL_TREE;
diff -rup orig/egcs-19980508/gcc/c-lex.c egcs-19980508/gcc/c-lex.c
--- orig/egcs-19980508/gcc/c-lex.c Wed May 6 17:06:43 1998
+++ egcs-19980508/gcc/c-lex.c Sun May 10 17:55:40 1998
@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h"
#include "tree.h"
#include "input.h"
+#include "output.h"
#include "c-lex.h"
#include "c-tree.h"
#include "flags.h"
diff -rup orig/egcs-19980508/gcc/c-lex.h egcs-19980508/gcc/c-lex.h
--- orig/egcs-19980508/gcc/c-lex.h Wed Apr 8 05:57:52 1998
+++ egcs-19980508/gcc/c-lex.h Sun May 10 17:33:57 1998
@@ -75,7 +75,7 @@ extern char *token_buffer; /* Pointer to
extern tree make_pointer_declarator PROTO((tree, tree));
extern void reinit_parse_for_function PROTO((void));
-extern void position_after_whitespace PROTO((void));
+extern void position_after_white_space PROTO((void));
extern int check_newline PROTO((void));
extern int yylex PROTO((void));
diff -rup orig/egcs-19980508/gcc/c-tree.h egcs-19980508/gcc/c-tree.h
--- orig/egcs-19980508/gcc/c-tree.h Tue Apr 21 09:25:56 1998
+++ egcs-19980508/gcc/c-tree.h Sun May 10 18:00:47 1998
@@ -149,6 +149,7 @@ struct lang_type
extern tree lookup_interface PROTO((tree));
extern tree is_class_name PROTO((tree));
extern void maybe_objc_check_decl PROTO((tree));
+extern void finish_file PROTO((void));
extern int maybe_objc_comptypes PROTO((tree, tree, int));
extern tree maybe_building_objc_message_expr PROTO((void));
extern tree maybe_objc_method_name PROTO((tree));
@@ -167,6 +168,9 @@ extern void check_function_format PROTO
NOP_EXPR is used as a special case (see truthvalue_conversion). */
extern void binary_op_error PROTO((enum tree_code));
extern void c_expand_expr_stmt PROTO((tree));
+extern void c_expand_start_cond PROTO((tree, int, int));
+extern void c_expand_start_else PROTO((void));
+extern void c_expand_end_cond PROTO((void));
/* Validate the expression after `case' and apply default promotions. */
extern tree check_case_value PROTO((tree));
/* Concatenate a list of STRING_CST nodes into one STRING_CST. */
@@ -366,6 +370,7 @@ extern void c_expand_return PROTO((tre
extern tree c_expand_start_case PROTO((tree));
/* in c-iterate.c */
+extern void init_iterators PROTO((void));
extern void iterator_expand PROTO((tree));
extern void iterator_for_loop_start PROTO((tree));
extern void iterator_for_loop_end PROTO((tree));
diff -rup orig/egcs-19980508/gcc/caller-save.c egcs-19980508/gcc/caller-save.c
--- orig/egcs-19980508/gcc/caller-save.c Fri Apr 3 11:33:33 1998
+++ egcs-19980508/gcc/caller-save.c Sun May 10 19:30:55 1998
@@ -505,7 +505,8 @@ save_call_clobbered_regs (insn_mode)
static void
set_reg_live (reg, setter)
- rtx reg, setter;
+ rtx reg;
+ rtx setter ATTRIBUTE_UNUSED;
{
register int regno, endregno, i;
enum machine_mode mode = GET_MODE (reg);
diff -rup orig/egcs-19980508/gcc/calls.c egcs-19980508/gcc/calls.c
--- orig/egcs-19980508/gcc/calls.c Wed May 6 00:45:47 1998
+++ egcs-19980508/gcc/calls.c Sun May 10 18:29:08 1998
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
#include "regs.h"
#include "insn-flags.h"
#include "toplev.h"
+#include "output.h"
/* Decide whether a function's arguments should be processed
from first to last or from last to first.
diff -rup orig/egcs-19980508/gcc/cccp.c egcs-19980508/gcc/cccp.c
--- orig/egcs-19980508/gcc/cccp.c Thu May 7 07:44:01 1998
+++ egcs-19980508/gcc/cccp.c Sun May 10 17:25:49 1998
@@ -10224,7 +10224,7 @@ pfatal_with_name (name)
static void
pipe_closed (signo)
/* If this is missing, some compilers complain. */
- int signo;
+ int signo ATTRIBUTE_UNUSED;
{
fatal ("output pipe has been closed");
}
diff -rup orig/egcs-19980508/gcc/combine.c egcs-19980508/gcc/combine.c
--- orig/egcs-19980508/gcc/combine.c Thu Apr 16 19:56:01 1998
+++ egcs-19980508/gcc/combine.c Sun May 10 18:48:29 1998
@@ -88,9 +88,10 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "regs.h"
#include "hard-reg-set.h"
-#include "expr.h"
#include "basic-block.h"
#include "insn-config.h"
+/* Include expr.h after insn-config.h so we get HAVE_conditional_move. */
+#include "expr.h"
#include "insn-flags.h"
#include "insn-codes.h"
#include "insn-attr.h"
next reply other threads:[~1998-05-12 10:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-12 10:17 Kaveh R. Ghazi [this message]
1998-05-13 1:58 ` Jeffrey A Law
1998-05-13 16:02 Kaveh R. Ghazi
1998-05-13 20:23 ` Jeffrey A Law
1998-05-14 11:50 Kaveh R. Ghazi
1998-05-14 21:48 ` Joern Rennecke
1998-05-15 1:48 ` Jeffrey A Law
1998-05-16 6:53 Kaveh R. Ghazi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199805121406.KAA28401@caip.rutgers.edu \
--to=ghazi@caip.rutgers.edu \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).