aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-05-13 10:00:46 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-05-13 10:00:46 +0000
commit7dee3f36c6feef2bc456ac5f578412d14d205e43 (patch)
tree80dff24a24d766b18e6efb5583cf5f1722233e98
parentd668e863c9fc14810a6d6390c47a071adae38db1 (diff)
downloadgcc-7dee3f36c6feef2bc456ac5f578412d14d205e43.zip
gcc-7dee3f36c6feef2bc456ac5f578412d14d205e43.tar.gz
gcc-7dee3f36c6feef2bc456ac5f578412d14d205e43.tar.bz2
Warning patches:
* Makefile.in (lex.o): Depend on output.h. * call.c (add_function_candidate): Remove unused variable `cand'. (add_conv_candidate): Likewise. (build_builtin_candidate): Likewise. * cp-tree.h: Add prototype for `types_overlap_p'. * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED. * decl2.c (merge_functions): Remove unused variables `tmp' and `tempn'. * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED. (code_as_string): Likewise. (language_as_string): Likewise. (parm_as_string): Likewise. (op_as_string): Likewise. (assop_as_string): Likewise. (cv_as_string): Likewise. * lex.c: Include output.h. * pt.c (type_unification): Cast first argument of `bzero' to a char*. * search.c (dfs_no_overlap_yet): Mark parameter `t' with ATTRIBUTE_UNUSED. * tinfo.cc (__class_type_info::dcast): Change the type of variable `i' from int to size_t. * typeck.c (language_lvalue_valid): Mark parameter `exp' with ATTRIBUTE_UNUSED. From-SVN: r19707
-rw-r--r--gcc/cp/ChangeLog36
-rw-r--r--gcc/cp/Makefile.in3
-rw-r--r--gcc/cp/call.c3
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/decl2.c1
-rw-r--r--gcc/cp/error.c15
-rw-r--r--gcc/cp/lex.c1
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/cp/search.c2
-rw-r--r--gcc/cp/tinfo.cc2
-rw-r--r--gcc/cp/typeck.c2
12 files changed, 53 insertions, 17 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a2742a5..8cfb061 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,39 @@
+Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (lex.o): Depend on output.h.
+
+ * call.c (add_function_candidate): Remove unused variable `cand'.
+ (add_conv_candidate): Likewise.
+ (build_builtin_candidate): Likewise.
+
+ * cp-tree.h: Add prototype for `types_overlap_p'.
+
+ * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
+
+ * decl2.c (merge_functions): Remove unused variables `tmp' and
+ `tempn'.
+
+ * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
+ (code_as_string): Likewise.
+ (language_as_string): Likewise.
+ (parm_as_string): Likewise.
+ (op_as_string): Likewise.
+ (assop_as_string): Likewise.
+ (cv_as_string): Likewise.
+
+ * lex.c: Include output.h.
+
+ * pt.c (type_unification): Cast first argument of `bzero' to a char*.
+
+ * search.c (dfs_no_overlap_yet): Mark parameter `t' with
+ ATTRIBUTE_UNUSED.
+
+ * tinfo.cc (__class_type_info::dcast): Change the type of variable
+ `i' from int to size_t.
+
+ * typeck.c (language_lvalue_valid): Mark parameter `exp' with
+ ATTRIBUTE_UNUSED.
+
Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
* error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
diff --git a/gcc/cp/Makefile.in b/gcc/cp/Makefile.in
index c917e60..869023d 100644
--- a/gcc/cp/Makefile.in
+++ b/gcc/cp/Makefile.in
@@ -234,7 +234,8 @@ spew.o : spew.c $(CONFIG_H) $(CXX_TREE_H) \
$(PARSE_H) $(srcdir)/../flags.h lex.h $(srcdir)/../system.h
lex.o : lex.c $(CONFIG_H) $(CXX_TREE_H) \
$(PARSE_H) input.c $(srcdir)/../flags.h hash.h lex.h \
- $(srcdir)/../c-pragma.h $(srcdir)/../system.h $(srcdir)/../toplev.h
+ $(srcdir)/../c-pragma.h $(srcdir)/../system.h $(srcdir)/../toplev.h \
+ $(srcdir)/../output.h
decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
lex.h decl.h $(srcdir)/../stack.h $(srcdir)/../output.h \
$(srcdir)/../except.h $(srcdir)/../system.h $(srcdir)/../toplev.h
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index fa02408..a5c16e9 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -1095,7 +1095,6 @@ add_function_candidate (candidates, fn, arglist, flags)
tree parmnode = parmlist;
tree argnode = arglist;
int viable = 1;
- struct z_candidate *cand;
/* The `this' and `in_chrg' arguments to constructors are not considered
in overload resolution. */
@@ -1183,7 +1182,6 @@ add_conv_candidate (candidates, fn, obj, arglist)
tree parmnode = parmlist;
tree argnode = arglist;
int viable = 1;
- struct z_candidate *cand;
int flags = LOOKUP_NORMAL;
for (i = 0; i < len; ++i)
@@ -1243,7 +1241,6 @@ build_builtin_candidate (candidates, fnname, type1, type2,
{
tree t, convs;
int viable = 1, i;
- struct z_candidate *cand;
tree types[2];
types[0] = type1;
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 3461bdb..183578b 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -2570,6 +2570,7 @@ extern tree build_dynamic_cast PROTO((tree, tree));
extern void synthesize_tinfo_fn PROTO((tree));
/* in search.c */
+extern int types_overlap_p PROTO((tree, tree));
extern void push_memoized_context PROTO((tree, int));
extern void pop_memoized_context PROTO((int));
extern tree get_vbase PROTO((tree, tree));
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 4650bf4..287c8ad 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5002,7 +5002,7 @@ lookup_name_current_level (name)
static void
signal_catch (sig)
- int sig;
+ int sig ATTRIBUTE_UNUSED;
{
signal (SIGSEGV, SIG_DFL);
#ifdef SIGIOT
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 927efb8..200ace4 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3743,7 +3743,6 @@ merge_functions (s1, s2)
tree s1;
tree s2;
{
- tree tmp, tempn;
if (TREE_CODE (s2) == OVERLOAD)
while (s2)
{
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 6173921..9ec1f28 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1706,7 +1706,7 @@ type_as_string (typ, v)
char *
expr_as_string (decl, v)
tree decl;
- int v;
+ int v ATTRIBUTE_UNUSED;
{
OB_INIT ();
@@ -1804,7 +1804,7 @@ cp_line_of (t)
char *
code_as_string (c, v)
enum tree_code c;
- int v;
+ int v ATTRIBUTE_UNUSED;
{
return tree_code_name [c];
}
@@ -1812,7 +1812,7 @@ code_as_string (c, v)
char *
language_as_string (c, v)
enum languages c;
- int v;
+ int v ATTRIBUTE_UNUSED;
{
switch (c)
{
@@ -1832,7 +1832,8 @@ language_as_string (c, v)
char *
parm_as_string (p, v)
- int p, v;
+ int p;
+ int v ATTRIBUTE_UNUSED;
{
if (p < 0)
return "`this'";
@@ -1844,7 +1845,7 @@ parm_as_string (p, v)
char *
op_as_string (p, v)
enum tree_code p;
- int v;
+ int v ATTRIBUTE_UNUSED;
{
static char buf[] = "operator ";
@@ -1858,7 +1859,7 @@ op_as_string (p, v)
char *
assop_as_string (p, v)
enum tree_code p;
- int v;
+ int v ATTRIBUTE_UNUSED;
{
static char buf[] = "operator ";
@@ -1897,7 +1898,7 @@ args_as_string (p, v)
char *
cv_as_string (p, v)
tree p;
- int v;
+ int v ATTRIBUTE_UNUSED;
{
OB_INIT ();
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 57707aa..36a0368 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h"
#include "c-pragma.h"
#include "toplev.h"
+#include "output.h"
/* MULTIBYTE_CHARS support only works for native compilers.
??? Ideally what we want is to model widechar support after
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 5b860ab..e993877 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5684,7 +5684,7 @@ type_unification (tparms, targs, parms, args, targs_in,
return 1;
explicit_mask = alloca (sizeof (int) * TREE_VEC_LENGTH (targs));
- bzero (explicit_mask, sizeof(int) * TREE_VEC_LENGTH (targs));
+ bzero ((char *) explicit_mask, sizeof(int) * TREE_VEC_LENGTH (targs));
for (i = 0;
i < TREE_VEC_LENGTH (arg_vec)
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 08291a8..c4b1b67 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -3868,7 +3868,7 @@ dfs_check_overlap (empty_binfo)
static int
dfs_no_overlap_yet (t)
- tree t;
+ tree t ATTRIBUTE_UNUSED;
{
return found_overlap == 0;
}
diff --git a/gcc/cp/tinfo.cc b/gcc/cp/tinfo.cc
index 3f32081..4b68fd1 100644
--- a/gcc/cp/tinfo.cc
+++ b/gcc/cp/tinfo.cc
@@ -77,7 +77,7 @@ dcast (const type_info& desired, int is_public, void *objptr,
return objptr;
void *match_found = 0;
- for (int i = 0; i < n_bases; i++)
+ for (size_t i = 0; i < n_bases; i++)
{
if (is_public && base_list[i].access != PUBLIC)
continue;
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index fe66a3b..27a9c6e 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -6220,7 +6220,7 @@ build_x_modify_expr (lhs, modifycode, rhs)
int
language_lvalue_valid (exp)
- tree exp;
+ tree exp ATTRIBUTE_UNUSED;
{
return 1;
}