diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1998-12-22 12:18:17 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1998-12-22 12:18:17 +0000 |
commit | e833cb112cb8b9024230acf78a286b687bd6e75e (patch) | |
tree | 21e618652a0cc0bdd053c11f957cdc45e47b5668 | |
parent | 193306f7fd78865e114ff26f24a9df7b143e95d3 (diff) | |
download | gcc-e833cb112cb8b9024230acf78a286b687bd6e75e.zip gcc-e833cb112cb8b9024230acf78a286b687bd6e75e.tar.gz gcc-e833cb112cb8b9024230acf78a286b687bd6e75e.tar.bz2 |
Warning fixes:
* Makefile.in (cvt.o): Depend on toplev.h.
* cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
* cvt.c: Include toplev.h.
* except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
definitions.
* init.c (expand_vec_init): Initialize variable `itype'.
* lex.c (yyerror): Cast the argument passed to a ctype function to
an unsigned char.
* method.c (build_mangled_C9x_name): Wrap prototype and definition
in "HOST_BITS_PER_WIDE_INT >= 64".
* typeck.c (build_binary_op): Mark parameter `convert_p' with
ATTRIBUTE_UNUSED.
From-SVN: r24395
-rw-r--r-- | gcc/cp/ChangeLog | 22 | ||||
-rw-r--r-- | gcc/cp/Makefile.in | 3 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 2 | ||||
-rw-r--r-- | gcc/cp/cvt.c | 1 | ||||
-rw-r--r-- | gcc/cp/except.c | 4 | ||||
-rw-r--r-- | gcc/cp/init.c | 2 | ||||
-rw-r--r-- | gcc/cp/lex.c | 2 | ||||
-rw-r--r-- | gcc/cp/method.c | 5 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 2 |
9 files changed, 36 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e4b724c..a1d4d34 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,25 @@ +Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * Makefile.in (cvt.o): Depend on toplev.h. + + * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes. + + * cvt.c: Include toplev.h. + + * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and + definitions. + + * init.c (expand_vec_init): Initialize variable `itype'. + + * lex.c (yyerror): Cast the argument passed to a ctype function to + an unsigned char. + + * method.c (build_mangled_C9x_name): Wrap prototype and definition + in "HOST_BITS_PER_WIDE_INT >= 64". + + * typeck.c (build_binary_op): Mark parameter `convert_p' with + ATTRIBUTE_UNUSED. + 1998-12-22 Mark Mitchell <mark@markmitchell.com> * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation. diff --git a/gcc/cp/Makefile.in b/gcc/cp/Makefile.in index 463c0f6..9fc861a 100644 --- a/gcc/cp/Makefile.in +++ b/gcc/cp/Makefile.in @@ -269,7 +269,8 @@ init.o : init.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \ $(EXPR_H) $(srcdir)/../system.h $(srcdir)/../toplev.h method.o : method.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../system.h \ $(srcdir)/../toplev.h -cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../system.h +cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../system.h \ + $(srcdir)/../toplev.h search.o : search.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../stack.h \ $(srcdir)/../flags.h $(srcdir)/../system.h $(srcdir)/../toplev.h tree.o : tree.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \ diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index f4399e7..b255933 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3024,6 +3024,7 @@ extern void synthesize_method PROTO((tree)); extern tree get_id_2 PROTO((char *, tree)); /* in pt.c */ +extern void check_template_shadow PROTO ((tree)); extern tree innermost_args PROTO ((tree)); extern tree tsubst PROTO ((tree, tree, tree)); extern tree tsubst_expr PROTO ((tree, tree, tree)); @@ -3220,6 +3221,7 @@ extern int yylex PROTO((void)); extern tree arbitrate_lookup PROTO((tree, tree, tree)); /* in tree.c */ +extern int pod_type_p PROTO((tree)); extern void unshare_base_binfos PROTO((tree)); extern int member_p PROTO((tree)); extern int real_lvalue_p PROTO((tree)); diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index b643ddc..d112096 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ #include "flags.h" #include "cp-tree.h" #include "convert.h" +#include "toplev.h" extern tree static_aggregates; diff --git a/gcc/cp/except.c b/gcc/cp/except.c index a2c2c51..2216a78 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -54,9 +54,9 @@ static tree get_eh_info PROTO((void)); static tree get_eh_value PROTO((void)); #if 0 static tree get_eh_type PROTO((void)); -#endif static tree get_eh_caught PROTO((void)); static tree get_eh_handlers PROTO((void)); +#endif static tree do_pop_exception PROTO((void)); static void process_start_catch_block PROTO((tree, tree)); static tree build_eh_type_type_ref PROTO((tree)); @@ -370,7 +370,6 @@ get_eh_type () return build_component_ref (get_eh_info (), get_identifier ("type"), NULL_TREE, 0); } -#endif /* Returns a reference to whether or not the current exception has been caught. */ @@ -391,6 +390,7 @@ get_eh_handlers () return build_component_ref (get_eh_info (), get_identifier ("handlers"), NULL_TREE, 0); } +#endif /* Build a type value for use at runtime for a type that is matched against by the exception handling system. */ diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 07a405f..d6898ff 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2759,7 +2759,7 @@ expand_vec_init (decl, base, maxindex, init, from_array) tree base2 = NULL_TREE; tree type = TREE_TYPE (TREE_TYPE (base)); tree size; - tree itype; + tree itype = NULL_TREE; tree iterator; int num_initialized_elts = 0; diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index d3b01a9..0d8996f 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -4774,7 +4774,7 @@ yyerror (string) strcat (buf, " before string constant"); else if (token_buffer[0] == '\'') strcat (buf, " before character constant"); - else if (!ISGRAPH (token_buffer[0])) + else if (!ISGRAPH ((unsigned char)token_buffer[0])) sprintf (buf + strlen (buf), " before character 0%o", (unsigned char) token_buffer[0]); else diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 3deaff7..8c3aa21 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -80,7 +80,9 @@ static int check_ktype PROTO((tree, int)); static int issue_ktype PROTO((tree)); static void build_overload_scope_ref PROTO((tree)); static void build_mangled_template_parm_index PROTO((char *, tree)); +#if HOST_BITS_PER_WIDE_INT >= 64 static void build_mangled_C9x_name PROTO((int)); +#endif static int is_back_referenceable_type PROTO((tree)); static int check_btype PROTO((tree)); static void build_mangled_name_for_type PROTO((tree)); @@ -644,6 +646,7 @@ build_mangled_template_parm_index (s, index) Given an integer in decimal format, mangle according to this scheme. */ +#if HOST_BITS_PER_WIDE_INT >= 64 static void build_mangled_C9x_name (bits) int bits; @@ -657,7 +660,7 @@ build_mangled_C9x_name (bits) OB_PUTCP (mangled); } - +#endif static void build_overload_value (type, value, in_template) diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index fddc999..f9c2057 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -3128,7 +3128,7 @@ tree build_binary_op (code, arg1, arg2, convert_p) enum tree_code code; tree arg1, arg2; - int convert_p; + int convert_p ATTRIBUTE_UNUSED; { return build_binary_op_nodefault (code, arg1, arg2, code); } |