Warning fixes:
* gjavah.c (print_c_decl): Remove unused argument `flags'. * jcf-dump.c (print_access_flags): Add braces around if-else. * jvspec.c (lang_specific_driver): Wrap variable `len' in macro COMBINE_INPUTS. * lex.c (build_wfl_node): Add static prototype. * lex.h (build_wfl_node): Remove static prototype. * parse.y: Include lex.c early enough to declare everything needed. Ensure calls to `build_wfl_node' pass the proper arguments. (create_class): Remove unused variable `super_decl'. (get_printable_method_name): Initialize variable `name'. From-SVN: r25921
This commit is contained in:
parent
ea735e02ae
commit
9ee9b55502
|
@ -1,3 +1,21 @@
|
|||
Tue Mar 23 10:05:27 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* gjavah.c (print_c_decl): Remove unused argument `flags'.
|
||||
|
||||
* jcf-dump.c (print_access_flags): Add braces around if-else.
|
||||
|
||||
* jvspec.c (lang_specific_driver): Wrap variable `len' in macro
|
||||
COMBINE_INPUTS.
|
||||
|
||||
* lex.c (build_wfl_node): Add static prototype.
|
||||
|
||||
* lex.h (build_wfl_node): Remove static prototype.
|
||||
|
||||
* parse.y: Include lex.c early enough to declare everything needed.
|
||||
Ensure calls to `build_wfl_node' pass the proper arguments.
|
||||
(create_class): Remove unused variable `super_decl'.
|
||||
(get_printable_method_name): Initialize variable `name'.
|
||||
|
||||
Mon Mar 22 20:14:26 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
|
||||
* Changelog: Fixed 1999-03-22 typos.
|
||||
|
|
|
@ -100,7 +100,7 @@ static struct method_name *method_name_list;
|
|||
|
||||
static void print_field_info PROTO ((FILE *, JCF*, int, int, JCF_u2));
|
||||
static void print_method_info PROTO ((FILE *, JCF*, int, int, JCF_u2));
|
||||
static void print_c_decl PROTO ((FILE*, JCF*, int, int, JCF_u2, int, const char *));
|
||||
static void print_c_decl PROTO ((FILE*, JCF*, int, int, int, const char *));
|
||||
static void decompile_method PROTO ((FILE *, JCF *, int));
|
||||
static void add_class_decl PROTO ((FILE *, JCF *, JCF_u2));
|
||||
|
||||
|
@ -426,7 +426,7 @@ DEFUN(print_field_info, (stream, jcf, name_index, sig_index, flags),
|
|||
}
|
||||
}
|
||||
|
||||
print_c_decl (out, jcf, name_index, sig_index, flags, 0, override);
|
||||
print_c_decl (out, jcf, name_index, sig_index, 0, override);
|
||||
fputs (";\n", out);
|
||||
|
||||
if (override)
|
||||
|
@ -509,7 +509,7 @@ DEFUN(print_method_info, (stream, jcf, name_index, sig_index, flags),
|
|||
if (! is_init)
|
||||
fputs ("virtual ", out);
|
||||
}
|
||||
print_c_decl (out, jcf, name_index, sig_index, flags, is_init, override);
|
||||
print_c_decl (out, jcf, name_index, sig_index, is_init, override);
|
||||
|
||||
if ((flags & ACC_ABSTRACT))
|
||||
fputs (" = 0", out);
|
||||
|
@ -676,10 +676,10 @@ decode_signature_piece (stream, signature, limit, need_space)
|
|||
}
|
||||
|
||||
static void
|
||||
DEFUN(print_c_decl, (stream, jcf, name_index, signature_index, flags, is_init,
|
||||
DEFUN(print_c_decl, (stream, jcf, name_index, signature_index, is_init,
|
||||
name_override),
|
||||
FILE* stream AND JCF* jcf
|
||||
AND int name_index AND int signature_index AND JCF_u2 flags
|
||||
AND int name_index AND int signature_index
|
||||
AND int is_init AND const char *name_override)
|
||||
{
|
||||
if (JPOOL_TAG (jcf, signature_index) != CONSTANT_Utf8)
|
||||
|
|
|
@ -321,10 +321,12 @@ DEFUN (print_access_flags, (stream, flags, context),
|
|||
if (flags & ACC_STATIC) fprintf (stream, " static");
|
||||
if (flags & ACC_FINAL) fprintf (stream, " final");
|
||||
if (flags & ACC_SYNCHRONIZED)
|
||||
if (context == 'c')
|
||||
fprintf (stream, " super");
|
||||
else
|
||||
fprintf (stream, " synchronized");
|
||||
{
|
||||
if (context == 'c')
|
||||
fprintf (stream, " super");
|
||||
else
|
||||
fprintf (stream, " synchronized");
|
||||
}
|
||||
if (flags & ACC_VOLATILE) fprintf (stream, " volatile");
|
||||
if (flags & ACC_TRANSIENT) fprintf (stream, " transient");
|
||||
if (flags & ACC_NATIVE) fprintf (stream, " native");
|
||||
|
|
|
@ -328,7 +328,9 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
|
|||
}
|
||||
else
|
||||
{
|
||||
#if COMBINE_INPUTS
|
||||
int len;
|
||||
#endif
|
||||
|
||||
if (saw_speclang)
|
||||
{
|
||||
|
|
|
@ -59,6 +59,7 @@ static void java_unicode_2_utf8 PROTO ((unicode_t));
|
|||
static void java_lex_error PROTO ((char *, int));
|
||||
#ifndef JC1_LITE
|
||||
static int java_is_eol PROTO ((FILE *, int));
|
||||
static tree build_wfl_node PROTO ((tree));
|
||||
#endif
|
||||
static void java_store_unicode PROTO ((struct java_line *, unicode_t, int));
|
||||
static unicode_t java_parse_escape_sequence PROTO ((void));
|
||||
|
|
|
@ -136,7 +136,6 @@ typedef struct _java_lc {
|
|||
#else
|
||||
|
||||
extern void set_float_handler PROTO((jmp_buf));
|
||||
static tree build_wfl_node ();
|
||||
#define SET_FLOAT_HANDLER(H) set_float_handler ((H))
|
||||
#define DCONST0 dconst0
|
||||
#define GET_IDENTIFIER(S) get_identifier ((S))
|
||||
|
|
952
gcc/java/parse.c
952
gcc/java/parse.c
File diff suppressed because it is too large
Load Diff
|
@ -303,6 +303,10 @@ static tree java_lang_cloneable = NULL_TREE;
|
|||
int value;
|
||||
}
|
||||
|
||||
%{
|
||||
#include "lex.c"
|
||||
%}
|
||||
|
||||
%pure_parser
|
||||
|
||||
/* Things defined here have to match the order of what's in the
|
||||
|
@ -1010,15 +1014,13 @@ explicit_constructor_invocation:
|
|||
this_or_super: /* Added, simplifies error diagnostics */
|
||||
THIS_TK
|
||||
{
|
||||
tree wfl = build_wfl_node (this_identifier_node,
|
||||
input_filename, 0, 0);
|
||||
tree wfl = build_wfl_node (this_identifier_node);
|
||||
EXPR_WFL_LINECOL (wfl) = $1.location;
|
||||
$$ = wfl;
|
||||
}
|
||||
| SUPER_TK
|
||||
{
|
||||
tree wfl = build_wfl_node (super_identifier_node,
|
||||
input_filename, 0, 0);
|
||||
tree wfl = build_wfl_node (super_identifier_node);
|
||||
EXPR_WFL_LINECOL (wfl) = $1.location;
|
||||
$$ = wfl;
|
||||
}
|
||||
|
@ -1861,8 +1863,7 @@ field_access:
|
|||
| SUPER_TK DOT_TK identifier
|
||||
{
|
||||
tree super_wfl =
|
||||
build_wfl_node (super_identifier_node,
|
||||
input_filename, 0, 0);
|
||||
build_wfl_node (super_identifier_node);
|
||||
EXPR_WFL_LINECOL (super_wfl) = $1.location;
|
||||
$$ = make_qualified_name (super_wfl, $3, $2.location);
|
||||
}
|
||||
|
@ -2278,8 +2279,6 @@ constant_expression:
|
|||
%%
|
||||
|
||||
|
||||
#include "lex.c"
|
||||
|
||||
/* Flag for the error report routine to issue the error the first time
|
||||
it's called (overriding the default behavior which is to drop the
|
||||
first invocation and honor the second one, taking advantage of a
|
||||
|
@ -2961,7 +2960,7 @@ create_class (flags, id, super, interfaces)
|
|||
{
|
||||
tree raw_name = EXPR_WFL_NODE (id);
|
||||
tree class_id, decl;
|
||||
tree super_decl = NULL, super_decl_type;
|
||||
tree super_decl_type;
|
||||
|
||||
class_id = parser_qualified_classname (id);
|
||||
decl = IDENTIFIER_CLASS_VALUE (class_id);
|
||||
|
@ -4375,7 +4374,7 @@ get_printable_method_name (decl)
|
|||
tree decl;
|
||||
{
|
||||
char *to_return;
|
||||
tree name;
|
||||
tree name = NULL_TREE;
|
||||
|
||||
if (DECL_CONSTRUCTOR_P (decl))
|
||||
{
|
||||
|
@ -5919,7 +5918,7 @@ make_qualified_primary (primary, right, location)
|
|||
different form than a SUPER. Turn THIS into something symbolic */
|
||||
if (TREE_CODE (primary) == THIS_EXPR)
|
||||
{
|
||||
wfl = build_wfl_node (this_identifier_node, input_filename, 0, 0);
|
||||
wfl = build_wfl_node (this_identifier_node);
|
||||
EXPR_WFL_LINECOL (wfl) = EXPR_WFL_LINECOL (primary);
|
||||
wfl = make_qualified_name (wfl, right, location);
|
||||
PRIMARY_P (wfl) = 1;
|
||||
|
@ -8329,8 +8328,7 @@ build_super_invocation ()
|
|||
return empty_stmt_node;
|
||||
else
|
||||
{
|
||||
tree super_wfl = build_wfl_node (super_identifier_node,
|
||||
input_filename, 0, 0);
|
||||
tree super_wfl = build_wfl_node (super_identifier_node);
|
||||
return build_method_invocation (super_wfl, NULL_TREE);
|
||||
}
|
||||
}
|
||||
|
@ -8346,8 +8344,7 @@ build_this_super_qualified_invocation (use_this, name, args, lloc, rloc)
|
|||
{
|
||||
tree invok;
|
||||
tree wfl =
|
||||
build_wfl_node ((use_this ? this_identifier_node : super_identifier_node),
|
||||
input_filename, 0, 0);
|
||||
build_wfl_node (use_this ? this_identifier_node : super_identifier_node);
|
||||
EXPR_WFL_LINECOL (wfl) = lloc;
|
||||
invok = build_method_invocation (name, args);
|
||||
return make_qualified_primary (wfl, invok, rloc);
|
||||
|
@ -10215,7 +10212,7 @@ static tree
|
|||
build_this (location)
|
||||
int location;
|
||||
{
|
||||
tree node = build_wfl_node (this_identifier_node, input_filename, 0, 0);
|
||||
tree node = build_wfl_node (this_identifier_node);
|
||||
TREE_SET_CODE (node, THIS_EXPR);
|
||||
EXPR_WFL_LINECOL (node) = location;
|
||||
return node;
|
||||
|
|
Loading…
Reference in New Issue