aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-06-22 05:59:23 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-06-22 05:59:23 +0000
commit63d088b75438a51ee0c5b63a801195453ce33cad (patch)
tree4f4fbbdafef4b61973a70c1c70e0a549f8ad8ba7
parentb3fb0b5e507318e1e89d170acf5ac63e8bd63c80 (diff)
downloadgcc-63d088b75438a51ee0c5b63a801195453ce33cad.zip
gcc-63d088b75438a51ee0c5b63a801195453ce33cad.tar.gz
gcc-63d088b75438a51ee0c5b63a801195453ce33cad.tar.bz2
Warning fixes:
* call.c (build_scoped_method_call): Remove unused variable `tmp'. * cp-tree.h (check_dtor_name): Add prototype. * init.c (expand_member_init): Remove unused variables `ptr_type_node', `parm' and `rval'. * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier in call to fprintf. (lang_print_xnode): Likewise. * typeck2.c (enum_name_string): Cast argument to sprintf to long and use %ld specifier. * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC specifier in call to fprintf. (GNU_xref_member): Cast argument to sprintf to int. From-SVN: r20653
-rw-r--r--gcc/cp/ChangeLog20
-rw-r--r--gcc/cp/call.c1
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/init.c5
-rw-r--r--gcc/cp/ptree.c18
-rw-r--r--gcc/cp/typeck2.c4
-rw-r--r--gcc/cp/xref.c8
7 files changed, 41 insertions, 16 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2182e19..6dd8d02 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,23 @@
+Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * call.c (build_scoped_method_call): Remove unused variable `tmp'.
+
+ * cp-tree.h (check_dtor_name): Add prototype.
+
+ * init.c (expand_member_init): Remove unused variables
+ `ptr_type_node', `parm' and `rval'.
+
+ * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
+ in call to fprintf.
+ (lang_print_xnode): Likewise.
+
+ * typeck2.c (enum_name_string): Cast argument to sprintf to long
+ and use %ld specifier.
+
+ * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
+ specifier in call to fprintf.
+ (GNU_xref_member): Cast argument to sprintf to int.
+
Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
* typeck2.c (pop_init_level): Warn about implicit zero initialization
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 8999897..f9a49aa 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -384,7 +384,6 @@ build_scoped_method_call (exp, basetype, name, parms)
@@ But we do have to check access privileges later. */
tree binfo, decl;
tree type = TREE_TYPE (exp);
- tree tmp;
if (type == error_mark_node
|| basetype == error_mark_node)
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index b94fc19..d3a6df9 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -2236,6 +2236,7 @@ extern tree current_class_type; /* _TYPE: the type of the current class */
extern char **opname_tab, **assignop_tab;
/* in call.c */
+extern int check_dtor_name PROTO((tree, tree));
extern int get_arglist_len_in_bytes PROTO((tree));
extern tree build_vfield_ref PROTO((tree, tree));
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 7989155..3b30779 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -904,11 +904,8 @@ void
expand_member_init (exp, name, init)
tree exp, name, init;
{
- extern tree ptr_type_node; /* should be in tree.h */
-
tree basetype = NULL_TREE, field;
- tree parm;
- tree rval = NULL_TREE, type;
+ tree type;
if (exp == NULL_TREE)
return; /* complain about this later */
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 3e2f914..aa3066c 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -70,9 +70,12 @@ print_lang_type (file, node, indent)
|| TREE_CODE (node) == TEMPLATE_TEMPLATE_PARM)
{
indent_to (file, indent + 3);
- fprintf (file, "index %d level %d orig_level %d",
- TEMPLATE_TYPE_IDX (node), TEMPLATE_TYPE_LEVEL (node),
- TEMPLATE_TYPE_ORIG_LEVEL (node));
+ fputs ("index ", file);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, TEMPLATE_TYPE_IDX (node));
+ fputs (" level ", file);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, TEMPLATE_TYPE_LEVEL (node));
+ fputs (" orig_level ", file);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, TEMPLATE_TYPE_ORIG_LEVEL (node));
return;
}
@@ -175,9 +178,12 @@ lang_print_xnode (file, node, indent)
break;
case TEMPLATE_PARM_INDEX:
indent_to (file, indent + 3);
- fprintf (file, "index %d level %d orig_level %d",
- TEMPLATE_PARM_IDX (node), TEMPLATE_PARM_LEVEL (node),
- TEMPLATE_PARM_ORIG_LEVEL (node));
+ fputs ("index ", file);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, TEMPLATE_PARM_IDX (node));
+ fputs (" level ", file);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, TEMPLATE_PARM_LEVEL (node));
+ fputs (" orig_level ", file);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, TEMPLATE_PARM_ORIG_LEVEL (node));
break;
default:
break;
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 400c360..bbc1965 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1530,8 +1530,8 @@ enum_name_string (value, type)
char *buf = (char *)oballoc (16 + TYPE_NAME_LENGTH (type));
/* Value must have been cast. */
- sprintf (buf, "(enum %s)%d",
- TYPE_NAME_STRING (type), intval);
+ sprintf (buf, "(enum %s)%ld",
+ TYPE_NAME_STRING (type), (long) intval);
return buf;
}
return IDENTIFIER_POINTER (TREE_PURPOSE (values));
diff --git a/gcc/cp/xref.c b/gcc/cp/xref.c
index 9c530d0..845a446 100644
--- a/gcc/cp/xref.c
+++ b/gcc/cp/xref.c
@@ -286,8 +286,10 @@ GNU_xref_end_scope (id,inid,prm,keep)
else if (keep == 2 || inid != 0) stype = "INTERN";
else stype = "EXTERN";
- fprintf (xref_file,"SCP %s %d %d %d %d %s\n",
- filename (xf), xs->start, lineno,xs->lid, inid, stype);
+ fprintf (xref_file, "SCP %s %d %d %d ",
+ filename (xf), xs->start, lineno,xs->lid);
+ fprintf (xref_file, HOST_WIDE_INT_PRINT_DEC, inid);
+ fprintf (xref_file, " %s\n", stype);
if (lxs == NULL) cur_scope = xs->outer;
else lxs->outer = xs->outer;
@@ -601,7 +603,7 @@ GNU_xref_member(cls, fld)
pure = 1;
d = IDENTIFIER_POINTER(cls);
- sprintf(buf, "%d%s", strlen(d), d);
+ sprintf(buf, "%d%s", (int) strlen(d), d);
#ifdef XREF_SHORT_MEMBER_NAMES
i = strlen(buf);
#endif