aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-03-23 07:24:15 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-03-23 07:24:15 +0000
commit9ee9b555021cd59c28ca989a4cdeff4cc0f9cbcc (patch)
treea2fcdf12a5baef3b05d14d32b95512c4b247997d /gcc/java/parse.y
parentea735e02ae57dfb05059317011ceb9935f1a44a6 (diff)
downloadgcc-9ee9b555021cd59c28ca989a4cdeff4cc0f9cbcc.zip
gcc-9ee9b555021cd59c28ca989a4cdeff4cc0f9cbcc.tar.gz
gcc-9ee9b555021cd59c28ca989a4cdeff4cc0f9cbcc.tar.bz2
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
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y29
1 files changed, 13 insertions, 16 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 68dfe24..f06ee9f 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -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;