Commit 0a2138e2 by Alexandre Petit-Bianco Committed by Alexandre Petit-Bianco

java-tree.h (pop_labeled_block, [...]): New function prototypes.

Wed Oct 14 18:21:29 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* java-tree.h (pop_labeled_block, lang_printable_name,
 	maybe_add_interface, set_super_info, get_access_flags_from_decl,
 	interface_of_p, inherits_from_p, fix_classpath,
 	complete_start_java_method, emit_handlers, init_outgoing_cpool,
 	make_class_data, register_class, alloc_name_constant): New
 	function prototypes.
	* lang.c (lang_decode_option): Set argc argument unused. Fixed
 	indentation. Added cast to remove warning.
	(lang_printable_name): Set v argument unused.
	(lang_print_error): Added argument to lang_printable_name call.
	(java_dummy_print, print_lang_decl, print_lang_type,
 	print_lang_identifier, lang_print_xnode): All argument marked
 	unused.
	* lex.c (java_unget_unicode): Removed unnecessary argument.
	(java_allocate_new_line): Unused local variable is gone.
	(java_read_char): Added parenthesis in expressions to remove
 	warnings.  Added final return statement.
	(java_read_unicode): Added parenthesis in expression to remove
 	warning.
	(java_parse_end_comment): Fixed java_unget_unicode invocation.
	(java_parse_escape_sequence): Likewise.
	(java_lex): Unused local variables are gone. Fixed
 	java_unget_unicode invocation.
	* lex.h (set_float_handler): Prototype added when JC1_LITE not
 	defined.
	* parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
 	lang_printable_name invocation in macro.
	(ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
 	Likewise.
	(duplicate_declaration_error): Suppressed unused argument in
 	prototype.
	(identical_subpath_p): Function declaration is gone.
	(patch_invoke): Suppressed unused argument in prototype.
	(patch_cast, build_labeled_block, check_thrown_exceptions):
 	Likewise.
	* parse.y (setjmp.h): Included
	(toplev.h): Likewise.
	(field_declaration:): Suppressed unused local
	(label_decl:): Fixed build_labeled_block invocation.
	(java_pop_parser_context): Put extra parenthesis around assignment
 	in if.
	(yyerror): Suppressed unused local variables.
	(variable_redefinition_error): Fixed lang_printable_name
 	invocation.
	(create_interface): Suppressed unused local variables.
	(create_class): Likewise.
	(duplicate_declaration_error): Suppressed unused argument. Fixed
 	lang_printable_name invocation.
	(register_fields): Suppressed unused local variable. Fixed
 	duplicate_declaration_error invocation.
	(method_header): Suppressed unused local variable.
	(method_declarator, parser_check_super): Likewise.
	(java_complete_class): Suppressed unused local variable. Fixed
 	fatal error message.
	(complete_class_report_errors): Added default: in switch.
	(java_check_regular_methods): Fixed lang_printable_name
 	invocations.
	(check_throws_clauses): Likewise.
	(java_check_abstract_methods): Suppressed unused local
 	variable. Fixed lang_printable_name invocation.
	(read_import_entry): Added supplemental return statement.
	(read_import_dir): Suppressed unused local variables.
	(check_pkg_class_access, declare_local_variables): Likewise.
	(source_start_java_method): Suppressed unused extern variable
 	declarations
	(expand_start_java_method): Suppressed unused extern and local
 	variable declarations.
	(java_complete_expand_methods): Likewise.
	(java_complete_expand_method): Suppressed unused local variables.
	(make_qualified_name): Likewise.
	(resolve_qualified_expression_name): Added default: in
 	switch. Fixed lang_printable_name invocation.
	(class_instance_creation_expression): Added parenthesis around
 	expressions.
	(patch_method_invocation_stmt): Fixed lang_printable_name and
 	patch_invoke invocations.
	(check_for_static_method_reference): Fixed lang_printable_name
 	invocation.
	(patch_invoke): Suppressed unused arguments and local variables.
	(lookup_method_invoke): Suppressed unused local variables.
	(qualify_ambiguous_name): Added default: in switch.
	(identical_subpath_p): Function removed.
	(patch_assignment): Suppressed unused local variables. Suppressed
 	unnecessary if statement. Fixed lang_printable_name invocations.
	(try_builtin_assignconv): Fixed lang_printable_name invocations.
	(valid_ref_assignconv_cast_p): Parenthesis around
 	expression. Suppressed unused local variables.
	(build_binop): Suppressed unused local variables. fixed
 	lang_printable_name invocations.
	(string_constant_concatenation): Suppressed unused local
 	variables.
	(patch_unaryop): Fixed lang_printable_name invocation.
	(patch_cast): Suppressed unnecessary argument. Fixed
 	lang_printable_name invocation.
	(patch_array_ref): Fixed lang_printable_name invocation.
	(patch_newarray, patch_return, patch_if_else_statement): Likewise.
	(build_labeled_block): Suppressed unused argument.
	(generate_labeled_block): Fixed build_labeled_block invocation.
	(build_loop_body): Suppressed unused local variables.
	(patch_loop_statement): Likewise.
	(patch_exit): Fixed lang_printable_name invocation.
	(patch_switch_statement): Likewise.
	(case_identity): First argument marked unused.
	(patch_try_statement): Fixed lang_printable_name invocations.
	(patch_synchronized_statement, patch_throw_statement): Likewise.
	(check_thrown_exceptions): Fixed check_thrown_exceptions and
 	lang_printable_name invocations.
	(check_thrown_exceptions_do): Suppressed unused argument.
Suppresses warnings during the compilation of parse.y (including
lex.c) and lang.c

From-SVN: r23090
parent c8bcefd8
Wed Oct 14 18:21:29 1998 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (pop_labeled_block, lang_printable_name,
maybe_add_interface, set_super_info, get_access_flags_from_decl,
interface_of_p, inherits_from_p, fix_classpath,
complete_start_java_method, emit_handlers, init_outgoing_cpool,
make_class_data, register_class, alloc_name_constant): New
function prototypes.
* lang.c (lang_decode_option): Set argc argument unused. Fixed
indentation. Added cast to remove warning.
(lang_printable_name): Set v argument unused.
(lang_print_error): Added argument to lang_printable_name call.
(java_dummy_print, print_lang_decl, print_lang_type,
print_lang_identifier, lang_print_xnode): All argument marked
unused.
* lex.c (java_unget_unicode): Removed unnecessary argument.
(java_allocate_new_line): Unused local variable is gone.
(java_read_char): Added parenthesis in expressions to remove
warnings. Added final return statement.
(java_read_unicode): Added parenthesis in expression to remove
warning.
(java_parse_end_comment): Fixed java_unget_unicode invocation.
(java_parse_escape_sequence): Likewise.
(java_lex): Unused local variables are gone. Fixed
java_unget_unicode invocation.
* lex.h (set_float_handler): Prototype added when JC1_LITE not
defined.
* parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
lang_printable_name invocation in macro.
(ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
Likewise.
(duplicate_declaration_error): Suppressed unused argument in
prototype.
(identical_subpath_p): Function declaration is gone.
(patch_invoke): Suppressed unused argument in prototype.
(patch_cast, build_labeled_block, check_thrown_exceptions):
Likewise.
* parse.y (setjmp.h): Included
(toplev.h): Likewise.
(field_declaration:): Suppressed unused local
(label_decl:): Fixed build_labeled_block invocation.
(java_pop_parser_context): Put extra parenthesis around assignment
in if.
(yyerror): Suppressed unused local variables.
(variable_redefinition_error): Fixed lang_printable_name
invocation.
(create_interface): Suppressed unused local variables.
(create_class): Likewise.
(duplicate_declaration_error): Suppressed unused argument. Fixed
lang_printable_name invocation.
(register_fields): Suppressed unused local variable. Fixed
duplicate_declaration_error invocation.
(method_header): Suppressed unused local variable.
(method_declarator, parser_check_super): Likewise.
(java_complete_class): Suppressed unused local variable. Fixed
fatal error message.
(complete_class_report_errors): Added default: in switch.
(java_check_regular_methods): Fixed lang_printable_name
invocations.
(check_throws_clauses): Likewise.
(java_check_abstract_methods): Suppressed unused local
variable. Fixed lang_printable_name invocation.
(read_import_entry): Added supplemental return statement.
(read_import_dir): Suppressed unused local variables.
(check_pkg_class_access, declare_local_variables): Likewise.
(source_start_java_method): Suppressed unused extern variable
declarations
(expand_start_java_method): Suppressed unused extern and local
variable declarations.
(java_complete_expand_methods): Likewise.
(java_complete_expand_method): Suppressed unused local variables.
(make_qualified_name): Likewise.
(resolve_qualified_expression_name): Added default: in
switch. Fixed lang_printable_name invocation.
(class_instance_creation_expression): Added parenthesis around
expressions.
(patch_method_invocation_stmt): Fixed lang_printable_name and
patch_invoke invocations.
(check_for_static_method_reference): Fixed lang_printable_name
invocation.
(patch_invoke): Suppressed unused arguments and local variables.
(lookup_method_invoke): Suppressed unused local variables.
(qualify_ambiguous_name): Added default: in switch.
(identical_subpath_p): Function removed.
(patch_assignment): Suppressed unused local variables. Suppressed
unnecessary if statement. Fixed lang_printable_name invocations.
(try_builtin_assignconv): Fixed lang_printable_name invocations.
(valid_ref_assignconv_cast_p): Parenthesis around
expression. Suppressed unused local variables.
(build_binop): Suppressed unused local variables. fixed
lang_printable_name invocations.
(string_constant_concatenation): Suppressed unused local
variables.
(patch_unaryop): Fixed lang_printable_name invocation.
(patch_cast): Suppressed unnecessary argument. Fixed
lang_printable_name invocation.
(patch_array_ref): Fixed lang_printable_name invocation.
(patch_newarray, patch_return, patch_if_else_statement): Likewise.
(build_labeled_block): Suppressed unused argument.
(generate_labeled_block): Fixed build_labeled_block invocation.
(build_loop_body): Suppressed unused local variables.
(patch_loop_statement): Likewise.
(patch_exit): Fixed lang_printable_name invocation.
(patch_switch_statement): Likewise.
(case_identity): First argument marked unused.
(patch_try_statement): Fixed lang_printable_name invocations.
(patch_synchronized_statement, patch_throw_statement): Likewise.
(check_thrown_exceptions): Fixed check_thrown_exceptions and
lang_printable_name invocations.
(check_thrown_exceptions_do): Suppressed unused argument.
1998-10-14 Tom Tromey <tromey@cygnus.com> 1998-10-14 Tom Tromey <tromey@cygnus.com>
* jcf-write.c (write_classfile): Add output class file as target. * jcf-write.c (write_classfile): Add output class file as target.
......
...@@ -507,6 +507,20 @@ extern void push_labeled_block PROTO ((tree)); ...@@ -507,6 +507,20 @@ extern void push_labeled_block PROTO ((tree));
extern tree prepare_eh_table_type PROTO ((tree)); extern tree prepare_eh_table_type PROTO ((tree));
extern void java_set_exception_lang_code PROTO (()); extern void java_set_exception_lang_code PROTO (());
extern tree generate_name PROTO ((void)); extern tree generate_name PROTO ((void));
extern void pop_labeled_block PROTO (());
extern char *lang_printable_name PROTO ((tree, int));
extern tree maybe_add_interface PROTO ((tree, tree));
extern void set_super_info PROTO ((int, tree, tree, int));
extern int get_access_flags_from_decl PROTO ((tree));
extern int interface_of_p PROTO ((tree, tree));
extern int inherits_from_p PROTO ((tree, tree));
extern void fix_classpath PROTO (());
extern void complete_start_java_method PROTO ((tree));
extern void emit_handlers PROTO (());
extern void init_outgoing_cpool PROTO (());
extern void make_class_data PROTO ((tree));
extern void register_class PROTO (());
extern int alloc_name_constant PROTO ((int, tree));
/* Access flags etc for a method (a FUNCTION_DECL): */ /* Access flags etc for a method (a FUNCTION_DECL): */
......
...@@ -118,7 +118,7 @@ static int dependency_tracking = 0; ...@@ -118,7 +118,7 @@ static int dependency_tracking = 0;
*/ */
int int
lang_decode_option (argc, argv) lang_decode_option (argc, argv)
int argc; int argc __attribute__ ((__unused__));
char **argv; char **argv;
{ {
char *p = argv[0]; char *p = argv[0];
...@@ -132,7 +132,8 @@ lang_decode_option (argc, argv) ...@@ -132,7 +132,8 @@ lang_decode_option (argc, argv)
p += 2; p += 2;
for (j = 0; for (j = 0;
!found && j < sizeof (lang_f_options) / sizeof (lang_f_options[0]); !found
&& j < (int)(sizeof (lang_f_options) / sizeof (lang_f_options[0]));
j++) j++)
{ {
if (!strcmp (p, lang_f_options[j].string)) if (!strcmp (p, lang_f_options[j].string))
...@@ -363,7 +364,7 @@ put_decl_node (node) ...@@ -363,7 +364,7 @@ put_decl_node (node)
char * char *
lang_printable_name (decl, v) lang_printable_name (decl, v)
tree decl; tree decl;
int v; int v __attribute__ ((__unused__));
{ {
decl_bufpos = 0; decl_bufpos = 0;
put_decl_node (decl); put_decl_node (decl);
...@@ -389,7 +390,7 @@ lang_print_error (file) ...@@ -389,7 +390,7 @@ lang_print_error (file)
last_error_function_context = DECL_CONTEXT (current_function_decl); last_error_function_context = DECL_CONTEXT (current_function_decl);
fprintf (stderr, "In class `%s':\n", fprintf (stderr, "In class `%s':\n",
lang_printable_name (last_error_function_context)); lang_printable_name (last_error_function_context, 0));
} }
if (last_error_function != current_function_decl) if (last_error_function != current_function_decl)
{ {
...@@ -451,7 +452,7 @@ lang_init () ...@@ -451,7 +452,7 @@ lang_init ()
function prototypes. */ function prototypes. */
void java_dummy_print (s) void java_dummy_print (s)
char *s; char *s __attribute__ ((__unused__));
{ {
} }
...@@ -493,25 +494,25 @@ lang_identify () ...@@ -493,25 +494,25 @@ lang_identify ()
void void
print_lang_decl (file, node, indent) print_lang_decl (file, node, indent)
FILE *file; FILE *file __attribute ((__unused__));
tree node; tree node __attribute ((__unused__));
int indent; int indent __attribute ((__unused__));
{ {
} }
void void
print_lang_type (file, node, indent) print_lang_type (file, node, indent)
FILE *file; FILE *file __attribute ((__unused__));
tree node; tree node __attribute ((__unused__));
int indent; int indent __attribute ((__unused__));
{ {
} }
void void
print_lang_identifier (file, node, indent) print_lang_identifier (file, node, indent)
FILE *file; FILE *file __attribute ((__unused__));
tree node; tree node __attribute ((__unused__));
int indent; int indent __attribute ((__unused__));
{ {
} }
...@@ -524,8 +525,8 @@ print_lang_statistics () ...@@ -524,8 +525,8 @@ print_lang_statistics ()
void void
lang_print_xnode (file, node, indent) lang_print_xnode (file, node, indent)
FILE *file; FILE *file __attribute ((__unused__));
tree node; tree node __attribute ((__unused__));
int indent; int indent __attribute ((__unused__));
{ {
} }
...@@ -36,6 +36,7 @@ Addison Wesley 1996" (http://java.sun.com/docs/books/jls/html/3.doc.html) */ ...@@ -36,6 +36,7 @@ Addison Wesley 1996" (http://java.sun.com/docs/books/jls/html/3.doc.html) */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <strings.h>
#include <setjmp.h> #include <setjmp.h>
#ifdef JAVA_LEX_DEBUG #ifdef JAVA_LEX_DEBUG
...@@ -125,8 +126,7 @@ java_sneak_unicode () ...@@ -125,8 +126,7 @@ java_sneak_unicode ()
} }
static void static void
java_unget_unicode (c) java_unget_unicode ()
unicode_t c;
{ {
if (!ctxp->c_line->current) if (!ctxp->c_line->current)
fatal ("can't unget unicode - java_unget_unicode"); fatal ("can't unget unicode - java_unget_unicode");
...@@ -137,7 +137,6 @@ java_unget_unicode (c) ...@@ -137,7 +137,6 @@ java_unget_unicode (c)
void void
java_allocate_new_line () java_allocate_new_line ()
{ {
int i;
unicode_t ahead = (ctxp->c_line ? ctxp->c_line->ahead[0] : '\0'); unicode_t ahead = (ctxp->c_line ? ctxp->c_line->ahead[0] : '\0');
char ahead_escape_p = (ctxp->c_line ? char ahead_escape_p = (ctxp->c_line ?
ctxp->c_line->unicode_escape_ahead_p : 0); ctxp->c_line->unicode_escape_ahead_p : 0);
...@@ -200,25 +199,26 @@ java_read_char () ...@@ -200,25 +199,26 @@ java_read_char ()
return UEOF; return UEOF;
else else
{ {
if (c & 0xe0 == 0xc0) if (c & (0xe0 == 0xc0))
{ {
c1 = GETC (); c1 = GETC ();
if (c1 & 0xc0 == 0x80) if (c1 & (0xc0 == 0x80))
return (unicode_t)(((c &0x1f) << 6) + (c1 & 0x3f)); return (unicode_t)(((c &0x1f) << 6) + (c1 & 0x3f));
} }
else if (c & 0xf0 == 0xe0) else if (c & (0xf0 == 0xe0))
{ {
c1 = GETC (); c1 = GETC ();
if (c1 & 0xc0 == 0x80) if (c1 & (0xc0 == 0x80))
{ {
c2 = GETC (); c2 = GETC ();
if (c2 & 0xc0 == 0x80) if (c2 & (0xc0 == 0x80))
return (unicode_t)(((c & 0xf) << 12) + return (unicode_t)(((c & 0xf) << 12) +
(( c1 & 0x3f) << 6) + (c2 & 0x3f)); (( c1 & 0x3f) << 6) + (c2 & 0x3f));
} }
} }
java_lex_error ("Bad utf8 encoding", 0); java_lex_error ("Bad utf8 encoding", 0);
} }
return 0;
} }
static void static void
...@@ -277,7 +277,7 @@ java_read_unicode (term_context, unicode_escape_p) ...@@ -277,7 +277,7 @@ java_read_unicode (term_context, unicode_escape_p)
if (c >= '0' && c <= '9') if (c >= '0' && c <= '9')
unicode |= (unicode_t)((c-'0') << shift); unicode |= (unicode_t)((c-'0') << shift);
else if ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) else if ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
unicode |= (unicode_t)(10+(c | 0x20)-'a' << shift); unicode |= (unicode_t)((10+(c | 0x20)-'a') << shift);
else else
java_lex_error java_lex_error
("Non hex digit in Unicode escape sequence", 0); ("Non hex digit in Unicode escape sequence", 0);
...@@ -364,7 +364,7 @@ java_parse_end_comment () ...@@ -364,7 +364,7 @@ java_parse_end_comment ()
case '/': case '/':
return; return;
case '*': /* reparse only '*' */ case '*': /* reparse only '*' */
java_unget_unicode (c); java_unget_unicode ();
} }
} }
} }
...@@ -413,7 +413,7 @@ java_parse_escape_sequence () ...@@ -413,7 +413,7 @@ java_parse_escape_sequence ()
c = java_get_unicode ()) c = java_get_unicode ())
octal_escape [octal_escape_index++] = c; octal_escape [octal_escape_index++] = c;
java_unget_unicode (c); java_unget_unicode ();
if ((octal_escape_index == 3) && (octal_escape [0] > '3')) if ((octal_escape_index == 3) && (octal_escape [0] > '3'))
{ {
...@@ -448,7 +448,6 @@ java_lex (java_lval) ...@@ -448,7 +448,6 @@ java_lex (java_lval)
YYSTYPE *java_lval; YYSTYPE *java_lval;
{ {
unicode_t c, first_unicode; unicode_t c, first_unicode;
int line_terminator;
int ascii_index, all_ascii; int ascii_index, all_ascii;
char *string; char *string;
...@@ -471,7 +470,7 @@ java_lex (java_lval) ...@@ -471,7 +470,7 @@ java_lex (java_lval)
if ((c = java_get_unicode ()) == UEOF) if ((c = java_get_unicode ()) == UEOF)
return 0; /* Ok here */ return 0; /* Ok here */
else else
java_unget_unicode (c); /* Caught latter at the end the function */ java_unget_unicode (); /* Caught latter at the end the function */
} }
/* Handle EOF here */ /* Handle EOF here */
if (c == UEOF) /* Should probably do something here... */ if (c == UEOF) /* Should probably do something here... */
...@@ -544,7 +543,7 @@ java_lex (java_lval) ...@@ -544,7 +543,7 @@ java_lex (java_lval)
java_lex_error java_lex_error
("Comment not terminated at end of input", 0); ("Comment not terminated at end of input", 0);
java_unget_unicode (c); java_unget_unicode ();
deprecated [deprecated_index] = '\0'; deprecated [deprecated_index] = '\0';
if (!strcmp (deprecated, "deprecated")) if (!strcmp (deprecated, "deprecated"))
{ {
...@@ -555,13 +554,13 @@ java_lex (java_lval) ...@@ -555,13 +554,13 @@ java_lex (java_lval)
} }
} }
else else
java_unget_unicode (c); java_unget_unicode ();
java_parse_end_comment (); java_parse_end_comment ();
goto step1; goto step1;
break; break;
default: default:
java_unget_unicode (c); java_unget_unicode ();
c = '/'; c = '/';
break; break;
} }
...@@ -575,7 +574,6 @@ java_lex (java_lval) ...@@ -575,7 +574,6 @@ java_lex (java_lval)
/* Numeric literals */ /* Numeric literals */
if (JAVA_ASCII_DIGIT (c) || (c == '.')) if (JAVA_ASCII_DIGIT (c) || (c == '.'))
{ {
unicode_t peep;
/* This section of code is borrowed from gcc/c-lex.c */ /* This section of code is borrowed from gcc/c-lex.c */
#define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2) #define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2)
int parts[TOTAL_PARTS]; int parts[TOTAL_PARTS];
...@@ -614,7 +612,7 @@ java_lex (java_lval) ...@@ -614,7 +612,7 @@ java_lex (java_lval)
else if (c == '.') else if (c == '.')
{ {
/* Push the '.' back and prepare for a FP parsing... */ /* Push the '.' back and prepare for a FP parsing... */
java_unget_unicode (c); java_unget_unicode ();
c = '0'; c = '0';
} }
else else
...@@ -635,7 +633,7 @@ java_lex (java_lval) ...@@ -635,7 +633,7 @@ java_lex (java_lval)
double_type_node); double_type_node);
return (FP_LIT_TK); return (FP_LIT_TK);
default: default:
java_unget_unicode (c); java_unget_unicode ();
SET_LVAL_NODE_TYPE (integer_zero_node, int_type_node); SET_LVAL_NODE_TYPE (integer_zero_node, int_type_node);
return (INT_LIT_TK); return (INT_LIT_TK);
} }
...@@ -745,7 +743,7 @@ java_lex (java_lval) ...@@ -745,7 +743,7 @@ java_lex (java_lval)
#endif #endif
if (stage != 4) /* Don't push back fF/dD */ if (stage != 4) /* Don't push back fF/dD */
java_unget_unicode (c); java_unget_unicode ();
/* An exponent (if any) must have seen a digit. */ /* An exponent (if any) must have seen a digit. */
if (seen_exponent && !seen_digit) if (seen_exponent && !seen_digit)
...@@ -790,7 +788,7 @@ java_lex (java_lval) ...@@ -790,7 +788,7 @@ java_lex (java_lval)
else if (radix == 16 && !literal_index) else if (radix == 16 && !literal_index)
java_lex_error ("No digit specified for hexadecimal literal", 0); java_lex_error ("No digit specified for hexadecimal literal", 0);
else else
java_unget_unicode (c); java_unget_unicode ();
#ifdef JAVA_LEX_DEBUG #ifdef JAVA_LEX_DEBUG
literal_token [literal_index] = '\0'; /* So JAVA_LEX_LIT is safe. */ literal_token [literal_index] = '\0'; /* So JAVA_LEX_LIT is safe. */
...@@ -965,7 +963,7 @@ java_lex (java_lval) ...@@ -965,7 +963,7 @@ java_lex (java_lval)
variable_declarator: rule, it has to be seen as '=' as opposed variable_declarator: rule, it has to be seen as '=' as opposed
to being seen as an ordinary assignment operator in to being seen as an ordinary assignment operator in
assignment_operators: rule. */ assignment_operators: rule. */
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (ASSIGN_TK); BUILD_OPERATOR (ASSIGN_TK);
} }
...@@ -984,17 +982,17 @@ java_lex (java_lval) ...@@ -984,17 +982,17 @@ java_lex (java_lval)
} }
else else
{ {
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (ZRS_TK); BUILD_OPERATOR (ZRS_TK);
} }
case '=': case '=':
BUILD_OPERATOR2 (SRS_ASSIGN_TK); BUILD_OPERATOR2 (SRS_ASSIGN_TK);
default: default:
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (SRS_TK); BUILD_OPERATOR (SRS_TK);
} }
default: default:
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (GT_TK); BUILD_OPERATOR (GT_TK);
} }
...@@ -1010,11 +1008,11 @@ java_lex (java_lval) ...@@ -1010,11 +1008,11 @@ java_lex (java_lval)
} }
else else
{ {
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (LS_TK); BUILD_OPERATOR (LS_TK);
} }
default: default:
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (LT_TK); BUILD_OPERATOR (LT_TK);
} }
...@@ -1026,7 +1024,7 @@ java_lex (java_lval) ...@@ -1026,7 +1024,7 @@ java_lex (java_lval)
case '=': case '=':
BUILD_OPERATOR2 (AND_ASSIGN_TK); BUILD_OPERATOR2 (AND_ASSIGN_TK);
default: default:
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (AND_TK); BUILD_OPERATOR (AND_TK);
} }
...@@ -1038,7 +1036,7 @@ java_lex (java_lval) ...@@ -1038,7 +1036,7 @@ java_lex (java_lval)
case '=': case '=':
BUILD_OPERATOR2 (OR_ASSIGN_TK); BUILD_OPERATOR2 (OR_ASSIGN_TK);
default: default:
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (OR_TK); BUILD_OPERATOR (OR_TK);
} }
...@@ -1050,7 +1048,7 @@ java_lex (java_lval) ...@@ -1050,7 +1048,7 @@ java_lex (java_lval)
case '=': case '=':
BUILD_OPERATOR2 (PLUS_ASSIGN_TK); BUILD_OPERATOR2 (PLUS_ASSIGN_TK);
default: default:
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (PLUS_TK); BUILD_OPERATOR (PLUS_TK);
} }
...@@ -1062,7 +1060,7 @@ java_lex (java_lval) ...@@ -1062,7 +1060,7 @@ java_lex (java_lval)
case '=': case '=':
BUILD_OPERATOR2 (MINUS_ASSIGN_TK); BUILD_OPERATOR2 (MINUS_ASSIGN_TK);
default: default:
java_unget_unicode (c); java_unget_unicode ();
ctxp->minus_seen = 1; ctxp->minus_seen = 1;
BUILD_OPERATOR (MINUS_TK); BUILD_OPERATOR (MINUS_TK);
} }
...@@ -1074,7 +1072,7 @@ java_lex (java_lval) ...@@ -1074,7 +1072,7 @@ java_lex (java_lval)
} }
else else
{ {
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (MULT_TK); BUILD_OPERATOR (MULT_TK);
} }
...@@ -1085,7 +1083,7 @@ java_lex (java_lval) ...@@ -1085,7 +1083,7 @@ java_lex (java_lval)
} }
else else
{ {
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (DIV_TK); BUILD_OPERATOR (DIV_TK);
} }
...@@ -1096,7 +1094,7 @@ java_lex (java_lval) ...@@ -1096,7 +1094,7 @@ java_lex (java_lval)
} }
else else
{ {
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (XOR_TK); BUILD_OPERATOR (XOR_TK);
} }
...@@ -1107,7 +1105,7 @@ java_lex (java_lval) ...@@ -1107,7 +1105,7 @@ java_lex (java_lval)
} }
else else
{ {
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (REM_TK); BUILD_OPERATOR (REM_TK);
} }
...@@ -1118,7 +1116,7 @@ java_lex (java_lval) ...@@ -1118,7 +1116,7 @@ java_lex (java_lval)
} }
else else
{ {
java_unget_unicode (c); java_unget_unicode ();
BUILD_OPERATOR (NEG_TK); BUILD_OPERATOR (NEG_TK);
} }
...@@ -1144,7 +1142,7 @@ java_lex (java_lval) ...@@ -1144,7 +1142,7 @@ java_lex (java_lval)
obstack_1grow (&temporary_obstack, '\0'); obstack_1grow (&temporary_obstack, '\0');
string = obstack_finish (&temporary_obstack); string = obstack_finish (&temporary_obstack);
java_unget_unicode (c); java_unget_unicode ();
/* If we have something all ascii, we consider a keyword, a boolean /* If we have something all ascii, we consider a keyword, a boolean
literal, a null literal or an all ASCII identifier. Otherwise, literal, a null literal or an all ASCII identifier. Otherwise,
......
...@@ -140,6 +140,7 @@ typedef struct _java_lc { ...@@ -140,6 +140,7 @@ typedef struct _java_lc {
#else #else
extern void set_float_handler PROTO((jmp_buf));
static tree build_wfl_node (); static tree build_wfl_node ();
#define SET_FLOAT_HANDLER(H) set_float_handler ((H)) #define SET_FLOAT_HANDLER(H) set_float_handler ((H))
#define DCONST0 dconst0 #define DCONST0 dconst0
......
...@@ -191,12 +191,12 @@ extern tree stabilize_reference PROTO ((tree)); ...@@ -191,12 +191,12 @@ extern tree stabilize_reference PROTO ((tree));
#define ERROR_CANT_CONVERT_TO_BOOLEAN(OPERATOR, NODE, TYPE) \ #define ERROR_CANT_CONVERT_TO_BOOLEAN(OPERATOR, NODE, TYPE) \
parse_error_context \ parse_error_context \
((OPERATOR), "Incompatible type for `%s'. Can't convert `%s' to " \ ((OPERATOR), "Incompatible type for `%s'. Can't convert `%s' to " \
"boolean", operator_string ((NODE)), lang_printable_name ((TYPE))) "boolean", operator_string ((NODE)), lang_printable_name ((TYPE),0))
#define ERROR_CANT_CONVERT_TO_NUMERIC(OPERATOR, NODE, TYPE) \ #define ERROR_CANT_CONVERT_TO_NUMERIC(OPERATOR, NODE, TYPE) \
parse_error_context \ parse_error_context \
((OPERATOR), "Incompatible type for `%s'. Can't convert `%s' to " \ ((OPERATOR), "Incompatible type for `%s'. Can't convert `%s' to " \
"numeric type", operator_string ((NODE)), lang_printable_name ((TYPE))) "numeric type", operator_string ((NODE)), lang_printable_name ((TYPE), 0))
#define ERROR_CAST_NEEDED_TO_INTEGRAL(OPERATOR, NODE, TYPE) \ #define ERROR_CAST_NEEDED_TO_INTEGRAL(OPERATOR, NODE, TYPE) \
parse_error_context \ parse_error_context \
...@@ -204,7 +204,7 @@ extern tree stabilize_reference PROTO ((tree)); ...@@ -204,7 +204,7 @@ extern tree stabilize_reference PROTO ((tree));
"Incompatible type for `%s'. Explicit cast needed to convert " \ "Incompatible type for `%s'. Explicit cast needed to convert " \
"`%s' to integral" : "Incompatible type for `%s'. Can't convert " \ "`%s' to integral" : "Incompatible type for `%s'. Can't convert " \
"`%s' to integral"), operator_string ((NODE)), \ "`%s' to integral"), operator_string ((NODE)), \
lang_printable_name ((TYPE))) lang_printable_name ((TYPE), 0))
#define ERROR_VARIABLE_NOT_INITIALIZED(WFL, V) \ #define ERROR_VARIABLE_NOT_INITIALIZED(WFL, V) \
parse_error_context \ parse_error_context \
...@@ -560,7 +560,7 @@ static tree create_class PROTO ((int, tree, tree, tree)); ...@@ -560,7 +560,7 @@ static tree create_class PROTO ((int, tree, tree, tree));
static tree create_interface PROTO ((int, tree, tree)); static tree create_interface PROTO ((int, tree, tree));
static tree find_field PROTO ((tree, tree)); static tree find_field PROTO ((tree, tree));
static tree lookup_field_wrapper PROTO ((tree, tree)); static tree lookup_field_wrapper PROTO ((tree, tree));
static int duplicate_declaration_error PROTO ((tree, tree, tree, tree)); static int duplicate_declaration_error PROTO ((tree, tree, tree));
static void register_fields PROTO ((int, tree, tree)); static void register_fields PROTO ((int, tree, tree));
static tree parser_qualified_classname PROTO ((tree)); static tree parser_qualified_classname PROTO ((tree));
static int parser_check_super PROTO ((tree, tree, tree)); static int parser_check_super PROTO ((tree, tree, tree));
...@@ -595,12 +595,11 @@ static tree patch_method_invocation_stmt PROTO ((tree, tree, tree, int *, tree * ...@@ -595,12 +595,11 @@ static tree patch_method_invocation_stmt PROTO ((tree, tree, tree, int *, tree *
static int breakdown_qualified PROTO ((tree *, tree *, tree)); static int breakdown_qualified PROTO ((tree *, tree *, tree));
static tree resolve_and_layout PROTO ((tree, tree)); static tree resolve_and_layout PROTO ((tree, tree));
static tree resolve_no_layout PROTO ((tree, tree)); static tree resolve_no_layout PROTO ((tree, tree));
static int identical_subpath_p PROTO ((tree, tree));
static int invocation_mode PROTO ((tree, int)); static int invocation_mode PROTO ((tree, int));
static tree find_applicable_accessible_methods_list PROTO ((tree, tree, tree)); static tree find_applicable_accessible_methods_list PROTO ((tree, tree, tree));
static tree find_most_specific_methods_list PROTO ((tree)); static tree find_most_specific_methods_list PROTO ((tree));
static int argument_types_convertible PROTO ((tree, tree)); static int argument_types_convertible PROTO ((tree, tree));
static tree patch_invoke PROTO ((tree, tree, tree, tree)); static tree patch_invoke PROTO ((tree, tree, tree));
static tree lookup_method_invoke PROTO ((int, tree, tree, tree, tree)); static tree lookup_method_invoke PROTO ((int, tree, tree, tree, tree));
static tree register_incomplete_type PROTO ((int, tree, tree, tree)); static tree register_incomplete_type PROTO ((int, tree, tree, tree));
static tree obtain_incomplete_type PROTO ((tree)); static tree obtain_incomplete_type PROTO ((tree));
...@@ -624,7 +623,7 @@ static tree build_unaryop PROTO ((int, int, tree)); ...@@ -624,7 +623,7 @@ static tree build_unaryop PROTO ((int, int, tree));
static tree build_incdec PROTO ((int, int, tree, int)); static tree build_incdec PROTO ((int, int, tree, int));
static tree patch_unaryop PROTO ((tree, tree)); static tree patch_unaryop PROTO ((tree, tree));
static tree build_cast PROTO ((int, tree, tree)); static tree build_cast PROTO ((int, tree, tree));
static tree patch_cast PROTO ((tree, tree, tree)); static tree patch_cast PROTO ((tree, tree));
static int valid_ref_assignconv_cast_p PROTO ((tree, tree, int)); static int valid_ref_assignconv_cast_p PROTO ((tree, tree, int));
static int valid_builtin_assignconv_identity_widening_p PROTO ((tree, tree)); static int valid_builtin_assignconv_identity_widening_p PROTO ((tree, tree));
static int valid_cast_to_p PROTO ((tree, tree)); static int valid_cast_to_p PROTO ((tree, tree));
...@@ -658,7 +657,7 @@ static tree patch_if_else_statement PROTO ((tree)); ...@@ -658,7 +657,7 @@ static tree patch_if_else_statement PROTO ((tree));
static tree add_stmt_to_compound PROTO ((tree, tree, tree)); static tree add_stmt_to_compound PROTO ((tree, tree, tree));
static tree add_stmt_to_block PROTO ((tree, tree, tree)); static tree add_stmt_to_block PROTO ((tree, tree, tree));
static tree patch_exit_expr PROTO ((tree)); static tree patch_exit_expr PROTO ((tree));
static tree build_labeled_block PROTO ((int, tree, tree)); static tree build_labeled_block PROTO ((int, tree));
static tree generate_labeled_block PROTO (()); static tree generate_labeled_block PROTO (());
static tree complete_labeled_statement PROTO ((tree, tree)); static tree complete_labeled_statement PROTO ((tree, tree));
static tree build_bc_statement PROTO ((int, int, tree)); static tree build_bc_statement PROTO ((int, int, tree));
...@@ -680,7 +679,7 @@ static tree patch_try_statement PROTO ((tree)); ...@@ -680,7 +679,7 @@ static tree patch_try_statement PROTO ((tree));
static tree patch_synchronized_statement PROTO ((tree, tree)); static tree patch_synchronized_statement PROTO ((tree, tree));
static tree patch_throw_statement PROTO ((tree, tree)); static tree patch_throw_statement PROTO ((tree, tree));
static void check_thrown_exceptions PROTO ((int, tree)); static void check_thrown_exceptions PROTO ((int, tree));
static int check_thrown_exceptions_do PROTO ((int, tree)); static int check_thrown_exceptions_do PROTO ((tree));
static void purge_unchecked_exceptions PROTO ((tree)); static void purge_unchecked_exceptions PROTO ((tree));
static void check_throws_clauses PROTO ((tree, tree, tree)); static void check_throws_clauses PROTO ((tree, tree, tree));
......
...@@ -51,6 +51,7 @@ definitions and other extensions. */ ...@@ -51,6 +51,7 @@ definitions and other extensions. */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <dirent.h> #include <dirent.h>
#include <setjmp.h> /* set_float_handler argument uses it */
#ifdef __STDC__ #ifdef __STDC__
#include <stdarg.h> #include <stdarg.h>
#else #else
...@@ -61,6 +62,7 @@ definitions and other extensions. */ ...@@ -61,6 +62,7 @@ definitions and other extensions. */
#include "tree.h" #include "tree.h"
#include "rtl.h" #include "rtl.h"
#include "obstack.h" #include "obstack.h"
#include "toplev.h"
#include "flags.h" #include "flags.h"
#include "java-tree.h" #include "java-tree.h"
#include "jcf.h" #include "jcf.h"
...@@ -573,8 +575,6 @@ field_declaration: ...@@ -573,8 +575,6 @@ field_declaration:
{ register_fields (0, $1, $2); } { register_fields (0, $1, $2); }
| modifiers type variable_declarators SC_TK | modifiers type variable_declarators SC_TK
{ {
int acc_count = 0;
check_modifiers check_modifiers
("Illegal modifier `%s' for field declaration", ("Illegal modifier `%s' for field declaration",
$1, FIELD_MODIFIERS); $1, FIELD_MODIFIERS);
...@@ -1041,7 +1041,7 @@ label_decl: ...@@ -1041,7 +1041,7 @@ label_decl:
identifier REL_CL_TK identifier REL_CL_TK
{ {
$$ = build_labeled_block (EXPR_WFL_LINECOL ($1), $$ = build_labeled_block (EXPR_WFL_LINECOL ($1),
EXPR_WFL_NODE ($1), $1); EXPR_WFL_NODE ($1));
pushlevel (2); pushlevel (2);
push_labeled_block ($$); push_labeled_block ($$);
PUSH_LABELED_BLOCK ($$); PUSH_LABELED_BLOCK ($$);
...@@ -2120,7 +2120,7 @@ java_pop_parser_context () ...@@ -2120,7 +2120,7 @@ java_pop_parser_context ()
IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_PURPOSE (current)) = 0; IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_PURPOSE (current)) = 0;
/* And restore those of the previous context */ /* And restore those of the previous context */
if (ctxp = next) if ((ctxp = next)) /* Assignment is really meant here */
for (current = ctxp->import_list; current; current = TREE_CHAIN (current)) for (current = ctxp->import_list; current; current = TREE_CHAIN (current))
IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_PURPOSE (current)) = 1; IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_PURPOSE (current)) = 1;
...@@ -2148,7 +2148,7 @@ yyerror (msg) ...@@ -2148,7 +2148,7 @@ yyerror (msg)
static int prev_lineno; static int prev_lineno;
static char *prev_msg; static char *prev_msg;
int i, save_lineno; int save_lineno;
char *remainder, *code_from_source; char *remainder, *code_from_source;
extern struct obstack temporary_obstack; extern struct obstack temporary_obstack;
...@@ -2332,7 +2332,7 @@ variable_redefinition_error (context, name, type, line) ...@@ -2332,7 +2332,7 @@ variable_redefinition_error (context, name, type, line)
if (TREE_CODE (type) == TREE_LIST) if (TREE_CODE (type) == TREE_LIST)
type_name = IDENTIFIER_POINTER (TYPE_NAME (TREE_PURPOSE (type))); type_name = IDENTIFIER_POINTER (TYPE_NAME (TREE_PURPOSE (type)));
else else
type_name = (char *)lang_printable_name (type); type_name = lang_printable_name (type, 0);
parse_error_context (context, parse_error_context (context,
"Variable `%s' is already defined in this method and " "Variable `%s' is already defined in this method and "
...@@ -2525,7 +2525,6 @@ create_interface (flags, id, super) ...@@ -2525,7 +2525,6 @@ create_interface (flags, id, super)
int flags; int flags;
tree id, super; tree id, super;
{ {
int chk;
tree raw_name = EXPR_WFL_NODE (id); tree raw_name = EXPR_WFL_NODE (id);
tree q_name = parser_qualified_classname (id); tree q_name = parser_qualified_classname (id);
tree decl = IDENTIFIER_CLASS_VALUE (q_name); tree decl = IDENTIFIER_CLASS_VALUE (q_name);
...@@ -2572,7 +2571,6 @@ create_class (flags, id, super, interfaces) ...@@ -2572,7 +2571,6 @@ create_class (flags, id, super, interfaces)
int flags; int flags;
tree id, super, interfaces; tree id, super, interfaces;
{ {
int chk;
tree raw_name = EXPR_WFL_NODE (id); tree raw_name = EXPR_WFL_NODE (id);
tree class_id, decl; tree class_id, decl;
tree super_decl = NULL, super_decl_type; tree super_decl = NULL, super_decl_type;
...@@ -2666,20 +2664,20 @@ lookup_field_wrapper (class, name) ...@@ -2666,20 +2664,20 @@ lookup_field_wrapper (class, name)
the error */ the error */
static int static int
duplicate_declaration_error (class, new_field_name, new_type, cl) duplicate_declaration_error (new_field_name, new_type, cl)
tree class, new_field_name, new_type, cl; tree new_field_name, new_type, cl;
{ {
/* This might be modified to work with method decl as well */ /* This might be modified to work with method decl as well */
tree decl = find_field (TREE_TYPE (ctxp->current_parsed_class), tree decl = find_field (TREE_TYPE (ctxp->current_parsed_class),
new_field_name); new_field_name);
if (decl) if (decl)
{ {
char *t1 = strdup ((char *)lang_printable_name (new_type, 1)); char *t1 = strdup (lang_printable_name (new_type, 1));
char *t2 = char *t2 =
strdup ((TREE_CODE (TREE_TYPE (decl)) == TREE_LIST ? strdup ((TREE_CODE (TREE_TYPE (decl)) == TREE_LIST ?
IDENTIFIER_POINTER (TYPE_NAME IDENTIFIER_POINTER (TYPE_NAME
(TREE_PURPOSE (TREE_TYPE (decl)))) : (TREE_PURPOSE (TREE_TYPE (decl)))) :
(char *)lang_printable_name (TREE_TYPE (decl), 1))); lang_printable_name (TREE_TYPE (decl), 1)));
parse_error_context parse_error_context
(cl , "Duplicate variable declaration: `%s %s' was `%s %s' (%s:%d)", (cl , "Duplicate variable declaration: `%s %s' was `%s %s' (%s:%d)",
t1, IDENTIFIER_POINTER (new_field_name), t1, IDENTIFIER_POINTER (new_field_name),
...@@ -2701,7 +2699,7 @@ register_fields (flags, type, variable_list) ...@@ -2701,7 +2699,7 @@ register_fields (flags, type, variable_list)
int flags; int flags;
tree type, variable_list; tree type, variable_list;
{ {
tree current, type_decl, returned_type; tree current, returned_type;
tree class_type = TREE_TYPE (ctxp->current_parsed_class); tree class_type = TREE_TYPE (ctxp->current_parsed_class);
int saved_lineno = lineno; int saved_lineno = lineno;
int must_chain = 0; int must_chain = 0;
...@@ -2744,7 +2742,7 @@ register_fields (flags, type, variable_list) ...@@ -2744,7 +2742,7 @@ register_fields (flags, type, variable_list)
tree init = TREE_VALUE (current); tree init = TREE_VALUE (current);
tree current_name = EXPR_WFL_NODE (cl); tree current_name = EXPR_WFL_NODE (cl);
if (duplicate_declaration_error (class_type, current_name, type, cl)) if (duplicate_declaration_error (current_name, type, cl))
{ {
tree field_decl; tree field_decl;
lineno = EXPR_WFL_LINENO (cl); lineno = EXPR_WFL_LINENO (cl);
...@@ -2864,7 +2862,6 @@ method_header (flags, type, mdecl, throws) ...@@ -2864,7 +2862,6 @@ method_header (flags, type, mdecl, throws)
tree meth = TREE_VALUE (mdecl); tree meth = TREE_VALUE (mdecl);
tree id = TREE_PURPOSE (mdecl); tree id = TREE_PURPOSE (mdecl);
tree this_class = TREE_TYPE (ctxp->current_parsed_class); tree this_class = TREE_TYPE (ctxp->current_parsed_class);
tree handle_class = CLASS_TO_HANDLE_TYPE (this_class);
tree meth_name, returned_type, current; tree meth_name, returned_type, current;
int saved_lineno; int saved_lineno;
...@@ -3051,7 +3048,6 @@ method_declarator (id, list) ...@@ -3051,7 +3048,6 @@ method_declarator (id, list)
tree arg_types = NULL_TREE, current, node; tree arg_types = NULL_TREE, current, node;
tree meth = make_node (FUNCTION_TYPE); tree meth = make_node (FUNCTION_TYPE);
jdep *jdep; jdep *jdep;
int incomplete = 0;
patch_stage = JDEP_NO_PATCH; patch_stage = JDEP_NO_PATCH;
...@@ -3060,8 +3056,7 @@ method_declarator (id, list) ...@@ -3060,8 +3056,7 @@ method_declarator (id, list)
tree wfl_name = TREE_PURPOSE (current); tree wfl_name = TREE_PURPOSE (current);
tree type = TREE_VALUE (current); tree type = TREE_VALUE (current);
tree name = EXPR_WFL_NODE (wfl_name); tree name = EXPR_WFL_NODE (wfl_name);
tree patchable_type = NULL_TREE, already; tree already, arg_node, returned_type;
tree arg_node, returned_type;
/* Check redefinition */ /* Check redefinition */
for (already = arg_types; already; already = TREE_CHAIN (already)) for (already = arg_types; already; already = TREE_CHAIN (already))
...@@ -3172,7 +3167,6 @@ static int ...@@ -3172,7 +3167,6 @@ static int
parser_check_super (super_decl, this_decl, wfl) parser_check_super (super_decl, this_decl, wfl)
tree super_decl, this_decl, wfl; tree super_decl, this_decl, wfl;
{ {
tree this_type = TREE_TYPE (this_decl);
tree super_type = TREE_TYPE (super_decl); tree super_type = TREE_TYPE (super_decl);
/* SUPER should be a CLASS (neither an array nor an interface) */ /* SUPER should be a CLASS (neither an array nor an interface) */
...@@ -3369,7 +3363,6 @@ jdep_resolve_class (dep) ...@@ -3369,7 +3363,6 @@ jdep_resolve_class (dep)
void void
java_complete_class () java_complete_class ()
{ {
tree current;
tree cclass; tree cclass;
jdeplist *cclassd; jdeplist *cclassd;
int error_found; int error_found;
...@@ -3506,7 +3499,8 @@ java_complete_class () ...@@ -3506,7 +3499,8 @@ java_complete_class ()
break; break;
default: default:
fatal ("incomplete switch - java_complete_class"); fatal ("Can't handle patch code %d - java_complete_class",
JDEP_KIND (dep));
} }
} }
} }
...@@ -3718,6 +3712,10 @@ complete_class_report_errors (dep) ...@@ -3718,6 +3712,10 @@ complete_class_report_errors (dep)
(JDEP_WFL (dep), "Class `%s' not found in `throws'", (JDEP_WFL (dep), "Class `%s' not found in `throws'",
IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))); IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep))));
break; break;
default:
/* Fix for -Wall. Just break doing nothing. The error will be
caught later */
break;
} }
} }
...@@ -3803,12 +3801,12 @@ java_check_regular_methods (class_decl) ...@@ -3803,12 +3801,12 @@ java_check_regular_methods (class_decl)
types. */ types. */
if (TREE_TYPE (TREE_TYPE (found)) != TREE_TYPE (TREE_TYPE (method))) if (TREE_TYPE (TREE_TYPE (found)) != TREE_TYPE (TREE_TYPE (method)))
{ {
char *t = strdup ((char *)lang_printable_name (TREE_TYPE char *t = strdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)),
(TREE_TYPE (found)))); 0));
parse_error_context parse_error_context
(method_wfl, (method_wfl,
"Method `%s' was defined with return type `%s' in class `%s'", "Method `%s' was defined with return type `%s' in class `%s'",
lang_printable_name (found), t, lang_printable_name (found, 0), t,
IDENTIFIER_POINTER IDENTIFIER_POINTER
(DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found)))));
free (t); free (t);
...@@ -3824,7 +3822,7 @@ java_check_regular_methods (class_decl) ...@@ -3824,7 +3822,7 @@ java_check_regular_methods (class_decl)
(method_wfl, (method_wfl,
"%s methods can't be overriden. Method `%s' is %s in class `%s'", "%s methods can't be overriden. Method `%s' is %s in class `%s'",
(METHOD_FINAL (found) ? "Final" : "Static"), (METHOD_FINAL (found) ? "Final" : "Static"),
lang_printable_name (found), lang_printable_name (found, 0),
(METHOD_FINAL (found) ? "final" : "static"), (METHOD_FINAL (found) ? "final" : "static"),
IDENTIFIER_POINTER IDENTIFIER_POINTER
(DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found)))));
...@@ -3837,7 +3835,7 @@ java_check_regular_methods (class_decl) ...@@ -3837,7 +3835,7 @@ java_check_regular_methods (class_decl)
(method_wfl, (method_wfl,
"Instance methods can't be overriden by a static method. Method " "Instance methods can't be overriden by a static method. Method "
"`%s' is an instance method in class `%s'", "`%s' is an instance method in class `%s'",
lang_printable_name (found), lang_printable_name (found, 0),
IDENTIFIER_POINTER IDENTIFIER_POINTER
(DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found)))));
continue; continue;
...@@ -3851,7 +3849,7 @@ java_check_regular_methods (class_decl) ...@@ -3851,7 +3849,7 @@ java_check_regular_methods (class_decl)
parse_error_context parse_error_context
(method_wfl, (method_wfl,
"Methods can't be overridden to be more private. Method `%s' is " "Methods can't be overridden to be more private. Method `%s' is "
"%s in class `%s'", lang_printable_name (found), "%s in class `%s'", lang_printable_name (found, 0),
(METHOD_PUBLIC (found) ? "public" : "protected"), (METHOD_PUBLIC (found) ? "public" : "protected"),
IDENTIFIER_POINTER IDENTIFIER_POINTER
(DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found)))));
...@@ -3872,7 +3870,7 @@ java_check_regular_methods (class_decl) ...@@ -3872,7 +3870,7 @@ java_check_regular_methods (class_decl)
(method_wfl, "Method `%s' in class `%s' does not " (method_wfl, "Method `%s' in class `%s' does not "
"override the corresponding method in class `%s', which is " "override the corresponding method in class `%s', which is "
"private to a different package", "private to a different package",
lang_printable_name (found), lang_printable_name (found, 0),
IDENTIFIER_POINTER (DECL_NAME (class_decl)), IDENTIFIER_POINTER (DECL_NAME (class_decl)),
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found)))));
...@@ -3925,7 +3923,7 @@ check_throws_clauses (method, method_wfl, found) ...@@ -3925,7 +3923,7 @@ check_throws_clauses (method, method_wfl, found)
"`throws' clause. The exception must be a subclass of an " "`throws' clause. The exception must be a subclass of an "
"exception thrown by `%s' from class `%s'", "exception thrown by `%s' from class `%s'",
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))),
lang_printable_name (found), lang_printable_name (found, 0),
IDENTIFIER_POINTER IDENTIFIER_POINTER
(DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found)))));
} }
...@@ -3943,7 +3941,6 @@ java_check_abstract_methods (interface) ...@@ -3943,7 +3941,6 @@ java_check_abstract_methods (interface)
for (method = TYPE_METHODS (interface); method; method = TREE_CHAIN (method)) for (method = TYPE_METHODS (interface); method; method = TREE_CHAIN (method))
{ {
char *csig;
tree method_wfl = DECL_NAME (method); tree method_wfl = DECL_NAME (method);
/* 2- Check for double definition inside the defining interface */ /* 2- Check for double definition inside the defining interface */
...@@ -3955,12 +3952,12 @@ java_check_abstract_methods (interface) ...@@ -3955,12 +3952,12 @@ java_check_abstract_methods (interface)
found = lookup_java_interface_method2 (interface, method); found = lookup_java_interface_method2 (interface, method);
if (found) if (found)
{ {
char *t = strdup ((char *)lang_printable_name (TREE_TYPE char *t = strdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)),
(TREE_TYPE (found)))); 0));
parse_error_context parse_error_context
(method_wfl, (method_wfl,
"Method `%s' was defined with return type `%s' in class `%s ", "Method `%s' was defined with return type `%s' in class `%s ",
lang_printable_name (found), t, lang_printable_name (found, 0), t,
IDENTIFIER_POINTER IDENTIFIER_POINTER
(DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found)))));
free (t); free (t);
...@@ -3992,7 +3989,7 @@ java_check_abstract_methods (interface) ...@@ -3992,7 +3989,7 @@ java_check_abstract_methods (interface)
"method is redefined with a different return " "method is redefined with a different return "
"type in interface `%s'", "type in interface `%s'",
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (interface))), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (interface))),
lang_printable_name (found), lang_printable_name (found, 0),
IDENTIFIER_POINTER IDENTIFIER_POINTER
(DECL_NAME (TYPE_NAME (DECL_CONTEXT (sub_interface_method)))), (DECL_NAME (TYPE_NAME (DECL_CONTEXT (sub_interface_method)))),
IDENTIFIER_POINTER IDENTIFIER_POINTER
...@@ -4234,6 +4231,8 @@ read_import_entry (jcf, dirp, returned_name) ...@@ -4234,6 +4231,8 @@ read_import_entry (jcf, dirp, returned_name)
return (zipd->filename_length - current_entry_len); return (zipd->filename_length - current_entry_len);
} }
} }
*returned_name = NULL;
return 0;
} }
} }
...@@ -4248,10 +4247,8 @@ read_import_dir (wfl) ...@@ -4248,10 +4247,8 @@ read_import_dir (wfl)
char *name = IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl)); char *name = IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl));
int name_len = IDENTIFIER_LENGTH (EXPR_WFL_NODE (wfl)), reclen; int name_len = IDENTIFIER_LENGTH (EXPR_WFL_NODE (wfl)), reclen;
DIR *dirp = NULL; DIR *dirp = NULL;
tree dirname = ident_subst (name, name_len, "", '.', '/', "");
JCF jcfr, *jcf, *saved_jcf = current_jcf; JCF jcfr, *jcf, *saved_jcf = current_jcf;
char *founddirname, *d_name; char *founddirname, *d_name;
struct ZipFileCache zip_cache;
jcf = &jcfr; jcf = &jcfr;
if (!classpath) if (!classpath)
...@@ -4310,7 +4307,7 @@ read_import_dir (wfl) ...@@ -4310,7 +4307,7 @@ read_import_dir (wfl)
if (java_or_class) if (java_or_class)
{ {
char *id_name; char *id_name;
tree node, old; tree node;
obstack_grow (&temporary_obstack, name, name_len); obstack_grow (&temporary_obstack, name, name_len);
obstack_1grow (&temporary_obstack, '/'); obstack_1grow (&temporary_obstack, '/');
...@@ -4343,7 +4340,6 @@ find_in_imports_on_demand (class_type) ...@@ -4343,7 +4340,6 @@ find_in_imports_on_demand (class_type)
for (import = ctxp->import_demand_list; import; import = TREE_CHAIN (import)) for (import = ctxp->import_demand_list; import; import = TREE_CHAIN (import))
{ {
char *id_name; char *id_name;
tree found;
obstack_grow (&temporary_obstack, obstack_grow (&temporary_obstack,
IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))), IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))),
IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import)))); IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import))));
...@@ -4406,7 +4402,6 @@ check_pkg_class_access (class_name, cl) ...@@ -4406,7 +4402,6 @@ check_pkg_class_access (class_name, cl)
tree cl; tree cl;
{ {
tree type; tree type;
int access;
if (!QUALIFIED_P (class_name) || !IDENTIFIER_CLASS_VALUE (class_name)) if (!QUALIFIED_P (class_name) || !IDENTIFIER_CLASS_VALUE (class_name))
return 0; return 0;
...@@ -4434,7 +4429,7 @@ declare_local_variables (modifier, type, vlist) ...@@ -4434,7 +4429,7 @@ declare_local_variables (modifier, type, vlist)
tree type; tree type;
tree vlist; tree vlist;
{ {
tree decl, current, returned_type, type_wfl, init_stmt = NULL_TREE; tree decl, current, returned_type, type_wfl;
int must_chain = 0; int must_chain = 0;
/* Push a new block if statement were seen between the last time we /* Push a new block if statement were seen between the last time we
...@@ -4496,7 +4491,6 @@ declare_local_variables (modifier, type, vlist) ...@@ -4496,7 +4491,6 @@ declare_local_variables (modifier, type, vlist)
/* Add the initialization function to the current function's code */ /* Add the initialization function to the current function's code */
if (init) if (init)
{ {
tree wfl;
MODIFY_EXPR_FROM_INITIALIZATION_P (init) = 1; MODIFY_EXPR_FROM_INITIALIZATION_P (init) = 1;
java_method_add_stmt java_method_add_stmt
(current_function_decl, (current_function_decl,
...@@ -4525,7 +4519,6 @@ source_start_java_method (fndecl) ...@@ -4525,7 +4519,6 @@ source_start_java_method (fndecl)
tree parm_decl; tree parm_decl;
int i; int i;
extern tree current_binding_level;
current_function_decl = fndecl; current_function_decl = fndecl;
/* New scope for the function */ /* New scope for the function */
...@@ -4568,9 +4561,7 @@ expand_start_java_method (fndecl) ...@@ -4568,9 +4561,7 @@ expand_start_java_method (fndecl)
tree fndecl; tree fndecl;
{ {
tree tem, *ptr; tree tem, *ptr;
tree parm_decl;
extern tree current_binding_level;
current_function_decl = fndecl; current_function_decl = fndecl;
announce_function (fndecl); announce_function (fndecl);
...@@ -4718,10 +4709,8 @@ java_complete_expand_methods () ...@@ -4718,10 +4709,8 @@ java_complete_expand_methods ()
for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) for (current = ctxp->class_list; current; current = TREE_CHAIN (current))
{ {
extern tree current_constant_pool_data_ref;
tree class_type = CLASS_TO_HANDLE_TYPE (TREE_TYPE (current)); tree class_type = CLASS_TO_HANDLE_TYPE (TREE_TYPE (current));
tree decl; tree decl;
int saved_lineno;
current_class = TREE_TYPE (current); current_class = TREE_TYPE (current);
...@@ -4771,8 +4760,6 @@ static void ...@@ -4771,8 +4760,6 @@ static void
java_complete_expand_method (mdecl) java_complete_expand_method (mdecl)
tree mdecl; tree mdecl;
{ {
tree node;
jdep *current;
int no_ac_found = 1; int no_ac_found = 1;
/* We generate some code for an empty constructor */ /* We generate some code for an empty constructor */
...@@ -4924,7 +4911,6 @@ make_qualified_name (left, right, location) ...@@ -4924,7 +4911,6 @@ make_qualified_name (left, right, location)
tree left, right; tree left, right;
int location; int location;
{ {
int qualified;
tree left_id = EXPR_WFL_NODE (left); tree left_id = EXPR_WFL_NODE (left);
tree right_id = EXPR_WFL_NODE (right); tree right_id = EXPR_WFL_NODE (right);
tree wfl, merge; tree wfl, merge;
...@@ -5169,6 +5155,10 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) ...@@ -5169,6 +5155,10 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found)
return 1; return 1;
type = QUAL_DECL_TYPE (decl); type = QUAL_DECL_TYPE (decl);
continue; continue;
default:
/* Fix for -Wall Just go to the next statement. Don't
continue */
} }
/* If we fall here, we weren't processing a (static) function call. */ /* If we fall here, we weren't processing a (static) function call. */
...@@ -5220,7 +5210,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) ...@@ -5220,7 +5210,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found)
((from_cast ? qual_wfl : wfl), ((from_cast ? qual_wfl : wfl),
"No variable `%s' defined in class `%s'", "No variable `%s' defined in class `%s'",
IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)),
lang_printable_name (type)); lang_printable_name (type, 0));
else else
parse_error_context parse_error_context
(qual_wfl, "Undefined variable or class name: `%s'", (qual_wfl, "Undefined variable or class name: `%s'",
...@@ -5278,7 +5268,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) ...@@ -5278,7 +5268,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found)
parse_error_context parse_error_context
(qual_wfl, "Attempt to reference field `%s' in `%s %s'", (qual_wfl, "Attempt to reference field `%s' in `%s %s'",
IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)),
lang_printable_name (type), lang_printable_name (type, 0),
IDENTIFIER_POINTER (DECL_NAME (field_decl))); IDENTIFIER_POINTER (DECL_NAME (field_decl)));
return 1; return 1;
} }
...@@ -5431,7 +5421,7 @@ class_in_current_package (class) ...@@ -5431,7 +5421,7 @@ class_in_current_package (class)
qualified, class isn't in the current package. If there is a qualified, class isn't in the current package. If there is a
current package and the name of the CLASS is not qualified, class current package and the name of the CLASS is not qualified, class
isn't in the current package */ isn't in the current package */
if (!ctxp->package && qualified_flag || ctxp->package && !qualified_flag) if ((!ctxp->package && qualified_flag) || (ctxp->package && !qualified_flag))
return 0; return 0;
/* If there is not package and the name of CLASS isn't qualified, /* If there is not package and the name of CLASS isn't qualified,
...@@ -5539,12 +5529,12 @@ patch_method_invocation_stmt (patch, primary, where, is_static, ret_decl) ...@@ -5539,12 +5529,12 @@ patch_method_invocation_stmt (patch, primary, where, is_static, ret_decl)
list = lookup_method_invoke (0, wfl, type, identifier, args); list = lookup_method_invoke (0, wfl, type, identifier, args);
if (list && !METHOD_STATIC (list)) if (list && !METHOD_STATIC (list))
{ {
char *fct_name = strdup ((char *)lang_printable_name (list)); char *fct_name = strdup (lang_printable_name (list, 0));
parse_error_context parse_error_context
(identifier_wfl, (identifier_wfl,
"Can't make static reference to method `%s %s' in class `%s'", "Can't make static reference to method `%s %s' in class `%s'",
lang_printable_name (TREE_TYPE (TREE_TYPE (list))), fct_name, lang_printable_name (TREE_TYPE (TREE_TYPE (list)), 0),
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))));
free (fct_name); free (fct_name);
PATCH_METHOD_RETURN_ERROR (); PATCH_METHOD_RETURN_ERROR ();
} }
...@@ -5650,11 +5640,11 @@ patch_method_invocation_stmt (patch, primary, where, is_static, ret_decl) ...@@ -5650,11 +5640,11 @@ patch_method_invocation_stmt (patch, primary, where, is_static, ret_decl)
return the call */ return the call */
if (not_accessible_p (class_type, list, 0)) if (not_accessible_p (class_type, list, 0))
{ {
char *fct_name = strdup ((char *)lang_printable_name (list)); char *fct_name = strdup (lang_printable_name (list, 0));
parse_error_context parse_error_context
(wfl, "Can't access %s method `%s %s.%s' from `%s'", (wfl, "Can't access %s method `%s %s.%s' from `%s'",
java_accstring_lookup (get_access_flags_from_decl (list)), java_accstring_lookup (get_access_flags_from_decl (list)),
lang_printable_name (TREE_TYPE (TREE_TYPE (list))), lang_printable_name (TREE_TYPE (TREE_TYPE (list)), 0),
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class_type))), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class_type))), fct_name,
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class))));
free (fct_name); free (fct_name);
...@@ -5668,7 +5658,7 @@ patch_method_invocation_stmt (patch, primary, where, is_static, ret_decl) ...@@ -5668,7 +5658,7 @@ patch_method_invocation_stmt (patch, primary, where, is_static, ret_decl)
EH checking */ EH checking */
if (ret_decl) if (ret_decl)
*ret_decl = list; *ret_decl = list;
return patch_invoke (patch, list, args, wfl); return patch_invoke (patch, list, args);
} }
/* Check that we're not trying to do a static reference to a method in /* Check that we're not trying to do a static reference to a method in
...@@ -5681,10 +5671,10 @@ check_for_static_method_reference (wfl, node, method, where, primary) ...@@ -5681,10 +5671,10 @@ check_for_static_method_reference (wfl, node, method, where, primary)
if (METHOD_STATIC (current_function_decl) if (METHOD_STATIC (current_function_decl)
&& !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node))
{ {
char *fct_name = strdup ((char *)lang_printable_name (method)); char *fct_name = strdup (lang_printable_name (method, 0));
parse_error_context parse_error_context
(wfl, "Can't make static reference to method `%s %s' in class `%s'", (wfl, "Can't make static reference to method `%s %s' in class `%s'",
lang_printable_name (TREE_TYPE (TREE_TYPE (method))), fct_name, lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0), fct_name,
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (where)))); IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (where))));
free (fct_name); free (fct_name);
return 1; return 1;
...@@ -5696,14 +5686,13 @@ check_for_static_method_reference (wfl, node, method, where, primary) ...@@ -5696,14 +5686,13 @@ check_for_static_method_reference (wfl, node, method, where, primary)
mode. */ mode. */
static tree static tree
patch_invoke (patch, method, args, cl) patch_invoke (patch, method, args)
tree patch, method, args; tree patch, method, args;
tree cl;
{ {
int im; int im;
tree dtable, func; tree dtable, func;
tree signature = build_java_signature (TREE_TYPE (method)); tree signature = build_java_signature (TREE_TYPE (method));
tree original_call, node, t, ta; tree original_call, t, ta;
/* Last step for args: convert build-in types */ /* Last step for args: convert build-in types */
for (t = TYPE_ARG_TYPES (TREE_TYPE (method)), for (t = TYPE_ARG_TYPES (TREE_TYPE (method)),
...@@ -5799,7 +5788,7 @@ lookup_method_invoke (lc, cl, class, name, arg_list) ...@@ -5799,7 +5788,7 @@ lookup_method_invoke (lc, cl, class, name, arg_list)
{ {
tree method = make_node (FUNCTION_TYPE); tree method = make_node (FUNCTION_TYPE);
tree arg_type_list = NULL_TREE; tree arg_type_list = NULL_TREE;
tree signature, list, node, scratch; tree signature, list, node;
char *candidates; /* Used for error report */ char *candidates; /* Used for error report */
for (node = arg_list; node; node = TREE_CHAIN (node)) for (node = arg_list; node; node = TREE_CHAIN (node))
...@@ -6041,6 +6030,10 @@ qualify_ambiguous_name (id) ...@@ -6041,6 +6030,10 @@ qualify_ambiguous_name (id)
case ARRAY_REF: case ARRAY_REF:
qual_wfl = TREE_OPERAND (qual_wfl, 0); qual_wfl = TREE_OPERAND (qual_wfl, 0);
break; break;
default:
/* Fix for -Wall. Just break doing nothing */
break;
} }
name = EXPR_WFL_NODE (qual_wfl); name = EXPR_WFL_NODE (qual_wfl);
ptr_type = current_class; ptr_type = current_class;
...@@ -6167,23 +6160,6 @@ breakdown_qualified (left, right, source) ...@@ -6167,23 +6160,6 @@ breakdown_qualified (left, right, source)
return 0; return 0;
} }
/* Return 1 if N1 and N2 have identical sub-path. */
static int
identical_subpath_p (n1, n2)
tree n1, n2;
{
tree left1, left2;
if (!QUALIFIED_P (n1) || !QUALIFIED_P (n2))
return n1 == n2;
breakdown_qualified (&left1, NULL, n1);
breakdown_qualified (&left2, NULL, n2);
return left1 == left2;
}
static int static int
not_initialized_as_it_should_p (decl) not_initialized_as_it_should_p (decl)
tree decl; tree decl;
...@@ -6773,10 +6749,9 @@ patch_assignment (node, wfl_op1, wfl_op2) ...@@ -6773,10 +6749,9 @@ patch_assignment (node, wfl_op1, wfl_op2)
tree wfl_op1; tree wfl_op1;
tree wfl_op2; tree wfl_op2;
{ {
tree rhs = TREE_OPERAND (node, 1), temp; tree rhs = TREE_OPERAND (node, 1);
tree lvalue = TREE_OPERAND (node, 0); tree lvalue = TREE_OPERAND (node, 0);
tree lhs_type, rhs_type, new_rhs = NULL_TREE; tree lhs_type, rhs_type, new_rhs = NULL_TREE;
int all_primitive;
int error_found = 0; int error_found = 0;
int lvalue_from_array = 0; int lvalue_from_array = 0;
...@@ -6819,12 +6794,10 @@ patch_assignment (node, wfl_op1, wfl_op2) ...@@ -6819,12 +6794,10 @@ patch_assignment (node, wfl_op1, wfl_op2)
rhs_type = TREE_TYPE (rhs); rhs_type = TREE_TYPE (rhs);
/* 5.1 Try the assignment conversion for builtin type. */ /* 5.1 Try the assignment conversion for builtin type. */
if ((new_rhs = try_builtin_assignconv (wfl_op1, lhs_type, rhs))) new_rhs = try_builtin_assignconv (wfl_op1, lhs_type, rhs);
;
/* 5.2 If it failed, try a reference conversion */ /* 5.2 If it failed, try a reference conversion */
if (!new_rhs && if (!new_rhs && (new_rhs = try_reference_assignconv (lhs_type, rhs)))
(new_rhs = try_reference_assignconv (lhs_type, rhs)))
lhs_type = promote_type (rhs_type); lhs_type = promote_type (rhs_type);
/* 15.25.2 If we have a compound assignment, convert RHS into the /* 15.25.2 If we have a compound assignment, convert RHS into the
...@@ -6835,8 +6808,8 @@ patch_assignment (node, wfl_op1, wfl_op2) ...@@ -6835,8 +6808,8 @@ patch_assignment (node, wfl_op1, wfl_op2)
/* Explicit cast required. This is an error */ /* Explicit cast required. This is an error */
if (!new_rhs) if (!new_rhs)
{ {
char *t1 = strdup ((char *)lang_printable_name (TREE_TYPE (rhs))); char *t1 = strdup (lang_printable_name (TREE_TYPE (rhs), 0));
char *t2 = strdup ((char *)lang_printable_name (lhs_type)); char *t2 = strdup (lang_printable_name (lhs_type, 0));
tree wfl; tree wfl;
char operation [32]; /* Max size known */ char operation [32]; /* Max size known */
...@@ -6953,7 +6926,7 @@ try_builtin_assignconv (wfl_op1, lhs_type, rhs) ...@@ -6953,7 +6926,7 @@ try_builtin_assignconv (wfl_op1, lhs_type, rhs)
parse_warning_context parse_warning_context
(wfl_op1, "Constant expression `%s' to wide for narrowing " (wfl_op1, "Constant expression `%s' to wide for narrowing "
"primitive conversion to `%s'", "primitive conversion to `%s'",
print_int_node (rhs), lang_printable_name (lhs_type)); print_int_node (rhs), lang_printable_name (lhs_type, 0));
/* Reported a warning that will turn into an error further /* Reported a warning that will turn into an error further
down, so we don't return */ down, so we don't return */
} }
...@@ -7017,7 +6990,7 @@ valid_ref_assignconv_cast_p (source, dest, cast) ...@@ -7017,7 +6990,7 @@ valid_ref_assignconv_cast_p (source, dest, cast)
{ {
if (TYPE_CLASS_P (dest)) if (TYPE_CLASS_P (dest))
return source == dest || inherits_from_p (source, dest) return source == dest || inherits_from_p (source, dest)
|| cast && inherits_from_p (dest, source); || (cast && inherits_from_p (dest, source));
if (TYPE_INTERFACE_P (dest)) if (TYPE_INTERFACE_P (dest))
{ {
/* If doing a cast and SOURCE is final, the operation is /* If doing a cast and SOURCE is final, the operation is
...@@ -7054,7 +7027,7 @@ valid_ref_assignconv_cast_p (source, dest, cast) ...@@ -7054,7 +7027,7 @@ valid_ref_assignconv_cast_p (source, dest, cast)
{ {
tree method_source, method_dest; tree method_source, method_dest;
tree source_type; tree source_type;
tree source_sig, dest_sig; tree source_sig;
tree source_name; tree source_name;
for (method_source = TYPE_METHODS (source); method_source; for (method_source = TYPE_METHODS (source); method_source;
method_source = TREE_CHAIN (method_source)) method_source = TREE_CHAIN (method_source))
...@@ -7146,7 +7119,7 @@ build_binop (op, op_location, op1, op2) ...@@ -7146,7 +7119,7 @@ build_binop (op, op_location, op1, op2)
int op_location; int op_location;
tree op1, op2; tree op1, op2;
{ {
tree wfl, binop, merge; tree binop;
binop = build (op, NULL_TREE, op1, op2); binop = build (op, NULL_TREE, op1, op2);
TREE_SIDE_EFFECTS (binop) = 1; TREE_SIDE_EFFECTS (binop) = 1;
...@@ -7323,7 +7296,7 @@ patch_binop (node, wfl_op1, wfl_op2) ...@@ -7323,7 +7296,7 @@ patch_binop (node, wfl_op1, wfl_op2)
"shift distance from `%s' to integral" : "shift distance from `%s' to integral" :
"Incompatible type for `%s'. Can't convert shift distance from " "Incompatible type for `%s'. Can't convert shift distance from "
"`%s' to integral"), "`%s' to integral"),
operator_string (node), lang_printable_name (op2_type)); operator_string (node), lang_printable_name (op2_type, 0));
TREE_TYPE (node) = error_mark_node; TREE_TYPE (node) = error_mark_node;
error_found = 1; error_found = 1;
break; break;
...@@ -7449,11 +7422,11 @@ patch_binop (node, wfl_op1, wfl_op2) ...@@ -7449,11 +7422,11 @@ patch_binop (node, wfl_op1, wfl_op2)
else else
{ {
char *t1; char *t1;
t1 = strdup ((char *)lang_printable_name (op1_type)); t1 = strdup (lang_printable_name (op1_type, 0));
parse_error_context parse_error_context
(wfl_operator, "Incompatible type for `%s'. Can't convert `%s' " (wfl_operator, "Incompatible type for `%s'. Can't convert `%s' "
"to `%s'", operator_string (node), t1, "to `%s'", operator_string (node), t1,
lang_printable_name (op2_type)); lang_printable_name (op2_type, 0));
free (t1); free (t1);
TREE_TYPE (node) = boolean_type_node; TREE_TYPE (node) = boolean_type_node;
error_found = 1; error_found = 1;
...@@ -7564,7 +7537,7 @@ string_constant_concatenation (op1, op2) ...@@ -7564,7 +7537,7 @@ string_constant_concatenation (op1, op2)
{ {
if (TREE_CODE (op1) == STRING_CST || (TREE_CODE (op2) == STRING_CST)) if (TREE_CODE (op1) == STRING_CST || (TREE_CODE (op2) == STRING_CST))
{ {
tree string, rest, result; tree string, rest;
int invert; int invert;
string = (TREE_CODE (op1) == STRING_CST ? op1 : op2); string = (TREE_CODE (op1) == STRING_CST ? op1 : op2);
...@@ -7785,7 +7758,7 @@ patch_unaryop (node, wfl_op) ...@@ -7785,7 +7758,7 @@ patch_unaryop (node, wfl_op)
{ {
parse_error_context parse_error_context
(wfl_op, "Invalid argument type `%s' to `%s'", (wfl_op, "Invalid argument type `%s' to `%s'",
lang_printable_name (op_type), operator_string (node)); lang_printable_name (op_type, 0), operator_string (node));
TREE_TYPE (node) = error_mark_node; TREE_TYPE (node) = error_mark_node;
error_found = 1; error_found = 1;
} }
...@@ -7850,7 +7823,7 @@ patch_unaryop (node, wfl_op) ...@@ -7850,7 +7823,7 @@ patch_unaryop (node, wfl_op)
/* 15.15 Cast Expression */ /* 15.15 Cast Expression */
case CONVERT_EXPR: case CONVERT_EXPR:
value = patch_cast (node, wfl_op, wfl_operator); value = patch_cast (node, wfl_operator);
if (value == error_mark_node) if (value == error_mark_node)
{ {
TREE_TYPE (node) = error_mark_node; TREE_TYPE (node) = error_mark_node;
...@@ -7906,9 +7879,8 @@ resolve_type_during_patch (type) ...@@ -7906,9 +7879,8 @@ resolve_type_during_patch (type)
found. Otherwise NODE or something meant to replace it is returned. */ found. Otherwise NODE or something meant to replace it is returned. */
static tree static tree
patch_cast (node, wfl_op, wfl_operator) patch_cast (node, wfl_operator)
tree node; tree node;
tree wfl_op;
tree wfl_operator; tree wfl_operator;
{ {
tree op = TREE_OPERAND (node, 0); tree op = TREE_OPERAND (node, 0);
...@@ -7956,9 +7928,9 @@ patch_cast (node, wfl_op, wfl_operator) ...@@ -7956,9 +7928,9 @@ patch_cast (node, wfl_op, wfl_operator)
} }
/* Any other casts are proven incorrect at compile time */ /* Any other casts are proven incorrect at compile time */
t1 = strdup ((char *)lang_printable_name (op_type)); t1 = strdup (lang_printable_name (op_type, 0));
parse_error_context (wfl_operator, "Invalid cast from `%s' to `%s'", parse_error_context (wfl_operator, "Invalid cast from `%s' to `%s'",
t1, lang_printable_name (cast_type)); t1, lang_printable_name (cast_type, 0));
free (t1); free (t1);
return error_mark_node; return error_mark_node;
} }
...@@ -8004,7 +7976,7 @@ patch_array_ref (node, wfl_array, wfl_index) ...@@ -8004,7 +7976,7 @@ patch_array_ref (node, wfl_array, wfl_index)
{ {
parse_error_context parse_error_context
(wfl_operator, "`[]' can only be applied to arrays. It can't be " (wfl_operator, "`[]' can only be applied to arrays. It can't be "
"applied to `%s'", lang_printable_name (array_type)); "applied to `%s'", lang_printable_name (array_type, 0));
TREE_TYPE (node) = error_mark_node; TREE_TYPE (node) = error_mark_node;
error_found = 1; error_found = 1;
} }
...@@ -8020,7 +7992,7 @@ patch_array_ref (node, wfl_array, wfl_index) ...@@ -8020,7 +7992,7 @@ patch_array_ref (node, wfl_array, wfl_index)
(could_cast ? "Incompatible type for `[]'. Explicit cast needed to " (could_cast ? "Incompatible type for `[]'. Explicit cast needed to "
"convert `%s' to `int'" : "Incompatible type for `[]'. " "convert `%s' to `int'" : "Incompatible type for `[]'. "
"Can't convert `%s' to `int'"), "Can't convert `%s' to `int'"),
lang_printable_name (index_type)); lang_printable_name (index_type, 0));
TREE_TYPE (node) = error_mark_node; TREE_TYPE (node) = error_mark_node;
error_found = 1; error_found = 1;
} }
...@@ -8107,7 +8079,7 @@ patch_newarray (node) ...@@ -8107,7 +8079,7 @@ patch_newarray (node)
"%s convert `%s' to `int'", "%s convert `%s' to `int'",
(valid_cast_to_p (TREE_TYPE (dim), int_type_node) ? (valid_cast_to_p (TREE_TYPE (dim), int_type_node) ?
"Explicit cast needed to" : "Can't"), "Explicit cast needed to" : "Can't"),
lang_printable_name (TREE_TYPE (dim))); lang_printable_name (TREE_TYPE (dim), 0));
error_found = 1; error_found = 1;
} }
...@@ -8241,10 +8213,10 @@ patch_return (node) ...@@ -8241,10 +8213,10 @@ patch_return (node)
if (error_found) if (error_found)
{ {
char *t = strdup ((char *)lang_printable_name (mtype)); char *t = strdup (lang_printable_name (mtype, 0));
parse_error_context (wfl_operator, "`return' with%s value from `%s %s'", parse_error_context (wfl_operator, "`return' with%s value from `%s %s'",
(error_found == 1 ? "" : "out"), t, (error_found == 1 ? "" : "out"), t,
lang_printable_name (meth)); lang_printable_name (meth, 0));
free (t); free (t);
return error_mark_node; return error_mark_node;
} }
...@@ -8302,7 +8274,7 @@ patch_if_else_statement (node) ...@@ -8302,7 +8274,7 @@ patch_if_else_statement (node)
parse_error_context parse_error_context
(wfl_operator, (wfl_operator,
"Incompatible type for `if'. Can't convert `%s' to `boolean'", "Incompatible type for `if'. Can't convert `%s' to `boolean'",
lang_printable_name (TREE_TYPE (expression))); lang_printable_name (TREE_TYPE (expression), 0));
return error_mark_node; return error_mark_node;
} }
...@@ -8318,9 +8290,9 @@ patch_if_else_statement (node) ...@@ -8318,9 +8290,9 @@ patch_if_else_statement (node)
label, yet. */ label, yet. */
static tree static tree
build_labeled_block (location, label, wfl) build_labeled_block (location, label)
int location; int location;
tree label, wfl; tree label;
{ {
tree label_name = merge_qualified_name (label_id, label); tree label_name = merge_qualified_name (label_id, label);
tree label_decl, node; tree label_decl, node;
...@@ -8355,7 +8327,7 @@ build_labeled_block (location, label, wfl) ...@@ -8355,7 +8327,7 @@ build_labeled_block (location, label, wfl)
static tree static tree
generate_labeled_block () generate_labeled_block ()
{ {
return build_labeled_block (0, generate_name (), NULL_TREE); return build_labeled_block (0, generate_name ());
} }
/* A labeled statement LBE is attached a statement. */ /* A labeled statement LBE is attached a statement. */
...@@ -8421,7 +8393,7 @@ build_loop_body (location, condition, reversed) ...@@ -8421,7 +8393,7 @@ build_loop_body (location, condition, reversed)
tree condition; tree condition;
int reversed; int reversed;
{ {
tree first, second, label, body; tree first, second, body;
condition = build (EXIT_EXPR, NULL_TREE, condition); /* Force walk */ condition = build (EXIT_EXPR, NULL_TREE, condition); /* Force walk */
EXPR_WFL_LINECOL (condition) = location; /* For accurate error report */ EXPR_WFL_LINECOL (condition) = location; /* For accurate error report */
...@@ -8486,7 +8458,7 @@ static tree ...@@ -8486,7 +8458,7 @@ static tree
patch_loop_statement (loop) patch_loop_statement (loop)
tree loop; tree loop;
{ {
tree cbl, loop_label, to_return_as_loop; tree loop_label, to_return_as_loop;
if (LOOP_HAS_LABEL_P (loop)) if (LOOP_HAS_LABEL_P (loop))
{ {
...@@ -8652,7 +8624,7 @@ patch_exit_expr (node) ...@@ -8652,7 +8624,7 @@ patch_exit_expr (node)
(wfl_operator, (wfl_operator,
"Incompatible type for loop conditional. Can't convert `%s' to " "Incompatible type for loop conditional. Can't convert `%s' to "
"`boolean'", "`boolean'",
lang_printable_name (TREE_TYPE (expression))); lang_printable_name (TREE_TYPE (expression), 0));
return error_mark_node; return error_mark_node;
} }
/* Now we know things are allright, invert the condition, fold and /* Now we know things are allright, invert the condition, fold and
...@@ -8683,7 +8655,7 @@ patch_switch_statement (node) ...@@ -8683,7 +8655,7 @@ patch_switch_statement (node)
EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node);
parse_error_context (wfl_operator, "Incompatible type for `switch'. " parse_error_context (wfl_operator, "Incompatible type for `switch'. "
"Can't convert `%s' to `int'", "Can't convert `%s' to `int'",
lang_printable_name (se_type)); lang_printable_name (se_type, 0));
/* This is what java_complete_tree will check */ /* This is what java_complete_tree will check */
TREE_OPERAND (node, 0) = error_mark_node; TREE_OPERAND (node, 0) = error_mark_node;
return error_mark_node; return error_mark_node;
...@@ -8748,7 +8720,7 @@ patch_switch_statement (node) ...@@ -8748,7 +8720,7 @@ patch_switch_statement (node)
parse_error_context parse_error_context
(wfl_operator, (wfl_operator,
"Incompatible type for case. Can't convert `%s' to `int'", "Incompatible type for case. Can't convert `%s' to `int'",
lang_printable_name (TREE_TYPE (case_expr))); lang_printable_name (TREE_TYPE (case_expr), 0));
error_found = 1; error_found = 1;
break; break;
} }
...@@ -8785,9 +8757,9 @@ patch_switch_statement (node) ...@@ -8785,9 +8757,9 @@ patch_switch_statement (node)
dependant things, but they rely on gcc routines. This function is dependant things, but they rely on gcc routines. This function is
placed here because it uses things defined locally in parse.y. */ placed here because it uses things defined locally in parse.y. */
static tree static tree case_identity (t, v)
case_identity (t, v) tree t __attribute__ ((__unused__));
tree t, v; tree v;
{ {
return v; return v;
} }
...@@ -9017,7 +8989,7 @@ patch_try_statement (node) ...@@ -9017,7 +8989,7 @@ patch_try_statement (node)
"Can't catch class `%s'. Catch clause " "Can't catch class `%s'. Catch clause "
"parameter type must be a subclass of " "parameter type must be a subclass of "
"class `java.lang.Throwable'", "class `java.lang.Throwable'",
lang_printable_name (carg_type)); lang_printable_name (carg_type, 0));
error_found = 1; error_found = 1;
continue; continue;
} }
...@@ -9104,7 +9076,7 @@ patch_synchronized_statement (node, wfl_op1) ...@@ -9104,7 +9076,7 @@ patch_synchronized_statement (node, wfl_op1)
SET_WFL_OPERATOR (wfl_operator, node, wfl_op1); SET_WFL_OPERATOR (wfl_operator, node, wfl_op1);
parse_error_context (wfl_operator, "Incompatible type for `synchronized'" parse_error_context (wfl_operator, "Incompatible type for `synchronized'"
". Can't convert `%s' to `java.lang.Object'", ". Can't convert `%s' to `java.lang.Object'",
lang_printable_name (TREE_TYPE (expr))); lang_printable_name (TREE_TYPE (expr), 0));
return error_mark_node; return error_mark_node;
} }
...@@ -9165,7 +9137,7 @@ patch_throw_statement (node, wfl_op1) ...@@ -9165,7 +9137,7 @@ patch_throw_statement (node, wfl_op1)
SET_WFL_OPERATOR (wfl_operator, node, wfl_op1); SET_WFL_OPERATOR (wfl_operator, node, wfl_op1);
parse_error_context (wfl_operator, "Can't throw `%s'; it must be a " parse_error_context (wfl_operator, "Can't throw `%s'; it must be a "
"subclass of class `java.lang.Throwable'", "subclass of class `java.lang.Throwable'",
lang_printable_name (type)); lang_printable_name (type, 0));
/* If the thrown expression was a reference, we further the /* If the thrown expression was a reference, we further the
compile-time check. */ compile-time check. */
if (!JREFERENCE_TYPE_P (type)) if (!JREFERENCE_TYPE_P (type))
...@@ -9187,8 +9159,7 @@ patch_throw_statement (node, wfl_op1) ...@@ -9187,8 +9159,7 @@ patch_throw_statement (node, wfl_op1)
SET_WFL_OPERATOR (wfl_operator, node, wfl_op1); SET_WFL_OPERATOR (wfl_operator, node, wfl_op1);
if (!unchecked_ok) if (!unchecked_ok)
tryblock_throws_ok = tryblock_throws_ok =
check_thrown_exceptions_do (EXPR_WFL_LINECOL (wfl_operator), check_thrown_exceptions_do (TREE_TYPE (expr));
TREE_TYPE (expr));
if (!(unchecked_ok || tryblock_throws_ok)) if (!(unchecked_ok || tryblock_throws_ok))
{ {
/* If there is a surrounding try block that has no matching /* If there is a surrounding try block that has no matching
...@@ -9199,21 +9170,21 @@ patch_throw_statement (node, wfl_op1) ...@@ -9199,21 +9170,21 @@ patch_throw_statement (node, wfl_op1)
parse_error_context (wfl_operator, "Checked exception `%s' can't be " parse_error_context (wfl_operator, "Checked exception `%s' can't be "
"caught by any of the catch clause(s) " "caught by any of the catch clause(s) "
"of the surrounding `try' block", "of the surrounding `try' block",
lang_printable_name (type)); lang_printable_name (type, 0));
/* If we have no surrounding try statement and the method doesn't have /* If we have no surrounding try statement and the method doesn't have
any throws, report it now. FIXME */ any throws, report it now. FIXME */
else if (!EXCEPTIONS_P (currently_caught_type_list) else if (!EXCEPTIONS_P (currently_caught_type_list)
&& !tryblock_throws_ok) && !tryblock_throws_ok)
parse_error_context (wfl_operator, "Checked exception `%s' isn't " parse_error_context (wfl_operator, "Checked exception `%s' isn't "
"thrown from a `try' block", "thrown from a `try' block",
lang_printable_name (type)); lang_printable_name (type, 0));
/* Otherwise, the current method doesn't have the appropriate /* Otherwise, the current method doesn't have the appropriate
throws declaration */ throws declaration */
else else
parse_error_context (wfl_operator, "Checked exception `%s' doesn't " parse_error_context (wfl_operator, "Checked exception `%s' doesn't "
"match any of current method's `throws' " "match any of current method's `throws' "
"declaration(s)", "declaration(s)",
lang_printable_name (type)); lang_printable_name (type, 0));
return error_mark_node; return error_mark_node;
} }
...@@ -9238,13 +9209,13 @@ check_thrown_exceptions (location, decl) ...@@ -9238,13 +9209,13 @@ check_thrown_exceptions (location, decl)
/* For all the unchecked exceptions thrown by DECL */ /* For all the unchecked exceptions thrown by DECL */
for (throws = DECL_FUNCTION_THROWS (decl); throws; for (throws = DECL_FUNCTION_THROWS (decl); throws;
throws = TREE_CHAIN (throws)) throws = TREE_CHAIN (throws))
if (!check_thrown_exceptions_do (location, TREE_VALUE (throws))) if (!check_thrown_exceptions_do (TREE_VALUE (throws)))
{ {
EXPR_WFL_LINECOL (wfl_operator) = location; EXPR_WFL_LINECOL (wfl_operator) = location;
parse_error_context parse_error_context
(wfl_operator, "Exception `%s' must be caught, or it must be " (wfl_operator, "Exception `%s' must be caught, or it must be "
"declared in the `throws' clause of `%s'", "declared in the `throws' clause of `%s'",
lang_printable_name (TREE_VALUE (throws)), lang_printable_name (TREE_VALUE (throws), 0),
IDENTIFIER_POINTER (DECL_NAME (current_function_decl))); IDENTIFIER_POINTER (DECL_NAME (current_function_decl)));
} }
} }
...@@ -9254,8 +9225,7 @@ check_thrown_exceptions (location, decl) ...@@ -9254,8 +9225,7 @@ check_thrown_exceptions (location, decl)
current method. */ current method. */
static int static int
check_thrown_exceptions_do (location, exception) check_thrown_exceptions_do (exception)
int location;
tree exception; tree exception;
{ {
tree list = currently_caught_type_list; tree list = currently_caught_type_list;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment