aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-03-06 08:35:49 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-03-06 08:35:49 +0000
commit8e1f2d4c56e3d43c878a6ffe5e5c4aa6409fa035 (patch)
tree486a4183689a6c011bf01289c6a0096cfcea6c5e /gcc/java
parent158281d7a3e7b17ce77b9b4a64db4e6a400b66e0 (diff)
downloadgcc-8e1f2d4c56e3d43c878a6ffe5e5c4aa6409fa035.zip
gcc-8e1f2d4c56e3d43c878a6ffe5e5c4aa6409fa035.tar.gz
gcc-8e1f2d4c56e3d43c878a6ffe5e5c4aa6409fa035.tar.bz2
Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
* Makefile.in (jcf-parse.o): Depend on $(PARSE_H). (parse-scan.o): Depend on toplev.h. * class.c (make_method_value): Add prototype. Make it static. Remove unused second argument, caller changed. * expr.c (java_lang_expand_expr): Remove unused variable `return_label'. * java-tree.h: Don't prototype find_in_current_zip. Add prototypes for verify_constant_pool, start_java_method, end_java_method, give_name_to_locals, expand_byte_code, open_in_zip, set_constant_value, find_constant1, find_constant2, find_utf8_constant, find_string_constant, find_class_constant, find_fieldref_index, find_methodref_index, write_constant_pool, count_constant_pool_bytes and encode_newarray_type. * jcf-dump.c: Remove unused variable `LONG_temp'. * jcf-parse.c: Include parse.h. (jcf_parse_source): Remove unused parameter, all callers changed. (jcf_figure_file_type): Add static prototype. (find_in_current_zip): Likewise. Also remove unused parameter, all callers changed. (read_class): Initialize variable `saved_pos'. * jcf-reader.c (jcf_parse_preamble): Mark variables `minor_version' and `major_version' with ATTRIBUTE_UNUSED. * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE. (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE. (java_parse_doc_section): Initialize variable `seen_star'. (java_lex): Wrap variable `number_beginning' in !JC1_LITE. (java_lex_error): Mark parameters `msg' and `forward' with ATTRIBUTE_UNUSED. (java_get_line_col): Mark parameters `filename' and `line' with ATTRIBUTE_UNUSED. * parse-scan.y: Include toplev.h. (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED. * parse.h: use `struct JCF', not plain `JCF'. (java_parser_context_save_global, java_expand_classes java_parser_context_restore_global, java_parse): Add prototypes. * typeck.c (convert_ieee_real_to_integer): Remove unused variable `node'. From-SVN: r25616
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog50
-rw-r--r--gcc/java/Makefile.in4
-rw-r--r--gcc/java/class.c8
-rw-r--r--gcc/java/expr.c1
-rw-r--r--gcc/java/java-tree.h20
-rw-r--r--gcc/java/jcf-dump.c1
-rw-r--r--gcc/java/jcf-parse.c21
-rw-r--r--gcc/java/jcf-reader.c4
-rw-r--r--gcc/java/lex.c18
-rw-r--r--gcc/java/parse-scan.c183
-rw-r--r--gcc/java/parse-scan.y3
-rw-r--r--gcc/java/parse.h7
-rw-r--r--gcc/java/typeck.c2
13 files changed, 200 insertions, 122 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 5004261..b33a387 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,53 @@
+Sat Mar 6 11:17:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
+ (parse-scan.o): Depend on toplev.h.
+
+ * class.c (make_method_value): Add prototype. Make it static.
+ Remove unused second argument, caller changed.
+
+ * expr.c (java_lang_expand_expr): Remove unused variable
+ `return_label'.
+
+ * java-tree.h: Don't prototype find_in_current_zip.
+ Add prototypes for verify_constant_pool, start_java_method,
+ end_java_method, give_name_to_locals, expand_byte_code,
+ open_in_zip, set_constant_value, find_constant1, find_constant2,
+ find_utf8_constant, find_string_constant, find_class_constant,
+ find_fieldref_index, find_methodref_index, write_constant_pool,
+ count_constant_pool_bytes and encode_newarray_type.
+
+ * jcf-dump.c: Remove unused variable `LONG_temp'.
+
+ * jcf-parse.c: Include parse.h.
+ (jcf_parse_source): Remove unused parameter, all callers changed.
+ (jcf_figure_file_type): Add static prototype.
+ (find_in_current_zip): Likewise. Also remove unused parameter,
+ all callers changed.
+ (read_class): Initialize variable `saved_pos'.
+
+ * jcf-reader.c (jcf_parse_preamble): Mark variables
+ `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
+
+ * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
+ (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
+ (java_parse_doc_section): Initialize variable `seen_star'.
+ (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
+ (java_lex_error): Mark parameters `msg' and `forward' with
+ ATTRIBUTE_UNUSED.
+ (java_get_line_col): Mark parameters `filename' and `line' with
+ ATTRIBUTE_UNUSED.
+
+ * parse-scan.y: Include toplev.h.
+ (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
+
+ * parse.h: use `struct JCF', not plain `JCF'.
+ (java_parser_context_save_global, java_expand_classes
+ java_parser_context_restore_global, java_parse): Add prototypes.
+
+ * typeck.c (convert_ieee_real_to_integer): Remove unused variable
+ `node'.
+
Wed Feb 24 16:13:59 1999 Per Bothner <bothner@deneb.cygnus.com>
* check-init.c (check_init): COPYN takes word count, not bit count.
diff --git a/gcc/java/Makefile.in b/gcc/java/Makefile.in
index 8aad78e..b5696a5 100644
--- a/gcc/java/Makefile.in
+++ b/gcc/java/Makefile.in
@@ -300,7 +300,7 @@ jcf-depend.o : jcf-depend.c $(CONFIG_H) $(srcdir)/../system.h jcf.h
jcf-io.o : jcf-io.c $(CONFIG_H) $(srcdir)/../system.h
jcf-parse.o : jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(srcdir)/../flags.h \
$(srcdir)/../input.h java-except.h $(srcdir)/../system.h \
- $(srcdir)/../toplev.h
+ $(srcdir)/../toplev.h $(PARSE_H)
jcf-write.o : jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(RTL_H) \
java-opcodes.h parse.h buffer.h $(srcdir)/../system.h $(srcdir)/../toplev.h
jv-scan.o : jv-scan.c $(CONFIG_H) $(srcdir)/../system.h
@@ -309,7 +309,7 @@ lang.o : lang.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(srcdir)/../input.h \
$(srcdir)/../toplev.h $(srcdir)/../system.h
mangle.o : mangle.c $(CONFIG_H) jcf.h $(srcdir)/../system.h \
$(srcdir)/../toplev.h
-parse-scan.o : $(CONFIG_H) $(srcdir)/../system.h
+parse-scan.o : $(CONFIG_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
typeck.o : typeck.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h convert.h \
$(srcdir)/../toplev.h $(srcdir)/../system.h
verify.o : verify.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h javaop.h java-opcodes.h \
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 5b02f59..d92d4c3 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -37,6 +37,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "parse.h"
static tree mangle_class_field PROTO ((tree class));
+static tree make_method_value PROTO ((tree));
static rtx registerClass_libfunc;
@@ -874,10 +875,9 @@ make_field_value (tree fdecl)
return finit;
}
-tree
-make_method_value (mdecl, this_class_addr)
+static tree
+make_method_value (mdecl)
tree mdecl;
- tree this_class_addr;
{
tree minit;
tree code;
@@ -1042,7 +1042,7 @@ make_class_data (type)
if (METHOD_PRIVATE (method)
&& (flag_inline_functions || optimize))
continue;
- init = make_method_value (method, this_class_addr);
+ init = make_method_value (method);
method_count++;
methods = tree_cons (NULL_TREE, init, methods);
}
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 7e2e26c..6daeb92 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1886,7 +1886,6 @@ java_lang_expand_expr (exp, target, tmode, modifier)
for (current = TREE_OPERAND (exp, 1); current;
current = TREE_CHAIN (current))
{
- extern rtx return_label;
tree type;
tree catch = TREE_OPERAND (current, 0);
tree decl = BLOCK_EXPR_DECLS (catch);
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 28cba1c..b246306 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -587,10 +587,28 @@ extern int merge_type_state PROTO ((tree));
extern void push_type PROTO ((tree));
extern void load_type_state PROTO ((tree));
extern void add_interface PROTO ((tree, tree));
-extern int find_in_current_zip PROTO ((char *, int, struct JCF **));
extern void append_gpp_mangled_classtype PROTO ((struct obstack *, char *));
extern void emit_unicode_mangled_name PROTO ((struct obstack *, char *, int));
extern tree force_evaluation_order PROTO ((tree));
+extern int verify_constant_pool PROTO ((struct JCF *));
+extern void start_java_method PROTO ((tree));
+extern void end_java_method PROTO ((void));
+extern void give_name_to_locals PROTO ((struct JCF *));
+extern void expand_byte_code PROTO ((struct JCF *, tree));
+extern int open_in_zip PROTO ((struct JCF *, const char *, const char *, int));
+extern void set_constant_value PROTO ((tree, tree));
+#ifdef jword
+extern int find_constant1 PROTO ((struct CPool *, int, jword));
+extern int find_constant2 PROTO ((struct CPool *, int, jword, jword));
+#endif
+extern int find_utf8_constant PROTO ((struct CPool *, tree));
+extern int find_string_constant PROTO ((struct CPool *, tree));
+extern int find_class_constant PROTO ((struct CPool *, tree));
+extern int find_fieldref_index PROTO ((struct CPool *, tree));
+extern int find_methodref_index PROTO ((struct CPool *, tree));
+extern void write_constant_pool PROTO ((struct CPool *, unsigned char *, int));
+extern int count_constant_pool_bytes PROTO ((struct CPool *));
+extern int encode_newarray_type PROTO ((tree));
/* Access flags etc for a method (a FUNCTION_DECL): */
diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c
index 6f29b65..4512bcd 100644
--- a/gcc/java/jcf-dump.c
+++ b/gcc/java/jcf-dump.c
@@ -913,7 +913,6 @@ DEFUN(disassemble_method, (jcf, byte_ops, len),
{
int oldpc = PC;
int saw_index;
- jlong LONG_temp;
jint INT_temp;
switch (byte_ops[PC++])
{
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index ad0b807..9b854b4 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -33,6 +33,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "input.h"
#include "java-tree.h"
#include "toplev.h"
+#include "parse.h"
/* A CONSTANT_Utf8 element is converted to an IDENTIFIER_NODE at parse time. */
#define JPOOL_UTF(JCF, INDEX) CPOOL_UTF(&(JCF)->cpool, INDEX)
@@ -81,7 +82,9 @@ static tree give_name_to_class PROTO ((JCF *jcf, int index));
void parse_zip_file_entries PROTO (());
void process_zip_dir PROTO (());
static void parse_source_file PROTO ((tree));
-static void jcf_parse_source PROTO ((JCF *));
+static void jcf_parse_source PROTO ((void));
+static int jcf_figure_file_type PROTO ((JCF *));
+static int find_in_current_zip PROTO ((char *, struct JCF **));
/* Handle "SourceFile" attribute. */
@@ -465,15 +468,14 @@ read_class (name)
tree save_current_class = current_class;
char *save_input_filename = input_filename;
JCF *save_current_jcf = current_jcf;
- long saved_pos;
+ long saved_pos = 0;
if (current_jcf->read_state)
saved_pos = ftell (current_jcf->read_state);
push_obstacks (&permanent_obstack, &permanent_obstack);
/* Search in current zip first. */
- if (find_in_current_zip (IDENTIFIER_POINTER (name),
- IDENTIFIER_LENGTH (name), &jcf) == 0)
+ if (find_in_current_zip (IDENTIFIER_POINTER (name), &jcf) == 0)
/* FIXME: until the `.java' parser is fully working, we only
look for a .java file when one was mentioned on the
command line. This lets us test the .java parser fairly
@@ -496,7 +498,7 @@ read_class (name)
current_jcf = jcf;
if (current_jcf->java_source)
- jcf_parse_source (current_jcf);
+ jcf_parse_source ();
else {
java_parser_context_save_global ();
java_push_parser_context ();
@@ -560,9 +562,8 @@ load_class (class_or_name, verbose)
/* Parse a source file when JCF refers to a source file. */
-void
-jcf_parse_source (jcf)
- JCF *jcf;
+static void
+jcf_parse_source ()
{
tree file;
@@ -956,7 +957,7 @@ void process_zip_dir()
zip file. */
int
DEFUN(find_in_current_zip, (name, length, jcf),
- char *name AND int length AND JCF **jcf)
+ char *name AND JCF **jcf)
{
JCF *local_jcf;
tree class_name = maybe_get_identifier (name), class, icv;
@@ -979,7 +980,7 @@ DEFUN(find_in_current_zip, (name, length, jcf),
}
/* Figure what kind of file we're dealing with */
-int
+static int
DEFUN(jcf_figure_file_type, (jcf),
JCF *jcf)
{
diff --git a/gcc/java/jcf-reader.c b/gcc/java/jcf-reader.c
index f3c860f..49a9b16 100644
--- a/gcc/java/jcf-reader.c
+++ b/gcc/java/jcf-reader.c
@@ -139,8 +139,8 @@ DEFUN(jcf_parse_preamble, (jcf),
JCF* jcf)
{
uint32 magic = (JCF_FILL (jcf, 8), JCF_readu4 (jcf));
- uint16 minor_version = JCF_readu2 (jcf);
- uint16 major_version = JCF_readu2 (jcf);
+ uint16 minor_version ATTRIBUTE_UNUSED = JCF_readu2 (jcf);
+ uint16 major_version ATTRIBUTE_UNUSED = JCF_readu2 (jcf);
#ifdef HANDLE_MAGIC
HANDLE_MAGIC (magic, minor_version, major_version);
#endif
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index 98606cc..be5c849 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -57,7 +57,9 @@ static int java_lineterminator PROTO ((unicode_t));
static char *java_sprint_unicode PROTO ((struct java_line *, int));
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));
+#endif
static void java_store_unicode PROTO ((struct java_line *, unicode_t, int));
static unicode_t java_parse_escape_sequence PROTO (());
static int java_letter_or_digit_p PROTO ((unicode_t));
@@ -74,9 +76,9 @@ static unicode_t java_sneak_unicode PROTO (());
void
java_init_lex ()
{
+#ifndef JC1_LITE
int java_lang_imported = 0;
-#ifndef JC1_LITE
if (!java_lang_id)
java_lang_id = get_identifier ("java.lang");
if (!java_lang_cloneable)
@@ -398,7 +400,7 @@ static int
java_parse_doc_section (c)
unicode_t c;
{
- int valid_tag = 0, seen_star;
+ int valid_tag = 0, seen_star = 0;
while (JAVA_WHITE_SPACE_P (c) || (c == '*') || c == '\n')
{
@@ -604,7 +606,9 @@ java_lex (java_lval)
char literal_token [256];
int literal_index = 0, radix = 10, long_suffix = 0, overflow = 0, bytes;
int i;
+#ifndef JC1_LITE
int number_beginning = ctxp->c_line->current;
+#endif
/* We might have a . separator instead of a FP like .[0-9]* */
if (c == '.')
@@ -1291,8 +1295,8 @@ build_wfl_node (node)
static void
java_lex_error (msg, forward)
- char *msg;
- int forward;
+ char *msg ATTRIBUTE_UNUSED;
+ int forward ATTRIBUTE_UNUSED;
{
#ifndef JC1_LITE
ctxp->elc.line = ctxp->c_line->lineno;
@@ -1305,6 +1309,7 @@ java_lex_error (msg, forward)
#endif
}
+#ifndef JC1_LITE
static int
java_is_eol (fp, c)
FILE *fp;
@@ -1324,11 +1329,12 @@ java_is_eol (fp, c)
return 0;
}
}
+#endif
char *
java_get_line_col (filename, line, col)
- char *filename;
- int line, col;
+ char *filename ATTRIBUTE_UNUSED;
+ int line ATTRIBUTE_UNUSED, col ATTRIBUTE_UNUSED;
{
#ifdef JC1_LITE
return 0;
diff --git a/gcc/java/parse-scan.c b/gcc/java/parse-scan.c
index 4e79853..654efcf 100644
--- a/gcc/java/parse-scan.c
+++ b/gcc/java/parse-scan.c
@@ -121,6 +121,7 @@
#include "system.h"
#include "obstack.h"
+#include "toplev.h"
extern char *input_filename;
extern FILE *finput, *out;
@@ -175,7 +176,7 @@ static void report_main_declaration PROTO ((struct method_declarator *));
#include "lex.h"
#include "parse.h"
-#line 99 "./parse-scan.y"
+#line 100 "./parse-scan.y"
typedef union {
char *node;
struct method_declarator *declarator;
@@ -400,41 +401,41 @@ static const short yyrhs[] = { 123,
#if YYDEBUG != 0
static const short yyrline[] = { 0,
- 170, 175, 177, 178, 179, 180, 181, 185, 187, 190,
- 196, 201, 208, 210, 213, 217, 221, 225, 227, 234,
- 244, 246, 249, 253, 262, 267, 268, 269, 270, 271,
- 272, 273, 274, 277, 279, 282, 284, 287, 292, 294,
- 297, 301, 305, 307, 308, 314, 323, 334, 341, 341,
- 344, 346, 347, 350, 351, 354, 357, 361, 363, 366,
- 368, 371, 373, 374, 375, 378, 380, 381, 382, 386,
- 389, 393, 396, 399, 401, 404, 407, 411, 413, 417,
- 421, 424, 425, 427, 434, 441, 447, 450, 452, 460,
- 476, 492, 493, 496, 499, 503, 505, 506, 510, 512,
- 515, 525, 527, 530, 532, 538, 541, 545, 547, 548,
- 549, 553, 555, 558, 560, 564, 566, 571, 573, 575,
- 576, 580, 582, 585, 587, 590, 592, 595, 597, 598,
- 599, 602, 606, 611, 613, 614, 615, 618, 620, 624,
- 626, 629, 631, 634, 636, 637, 640, 644, 647, 651,
- 653, 654, 655, 656, 657, 660, 662, 663, 664, 665,
- 668, 670, 671, 672, 673, 674, 675, 676, 677, 678,
- 679, 682, 686, 691, 695, 701, 705, 707, 708, 709,
- 710, 711, 712, 715, 719, 723, 727, 731, 733, 734,
- 735, 738, 740, 743, 748, 750, 753, 755, 758, 762,
- 766, 770, 774, 778, 780, 783, 785, 788, 792, 795,
- 796, 797, 800, 801, 804, 806, 809, 811, 814, 816,
- 819, 821, 824, 828, 830, 833, 838, 840, 841, 844,
- 846, 849, 853, 858, 860, 863, 865, 866, 867, 868,
- 869, 870, 874, 876, 878, 882, 886, 888, 892, 893,
- 897, 898, 899, 900, 903, 906, 909, 911, 912, 915,
- 917, 918, 919, 922, 923, 926, 928, 931, 935, 937,
- 940, 942, 945, 948, 950, 951, 952, 953, 956, 959,
- 962, 964, 966, 967, 970, 974, 978, 980, 981, 982,
- 983, 986, 990, 994, 996, 997, 998, 1001, 1003, 1004,
- 1005, 1008, 1010, 1011, 1012, 1015, 1017, 1018, 1021, 1023,
- 1024, 1025, 1028, 1030, 1031, 1032, 1033, 1034, 1037, 1039,
- 1040, 1043, 1045, 1048, 1050, 1053, 1055, 1058, 1060, 1063,
- 1065, 1068, 1070, 1073, 1075, 1078, 1082, 1085, 1086, 1089,
- 1091, 1094, 1098
+ 171, 176, 178, 179, 180, 181, 182, 186, 188, 191,
+ 197, 202, 209, 211, 214, 218, 222, 226, 228, 235,
+ 245, 247, 250, 254, 263, 268, 269, 270, 271, 272,
+ 273, 274, 275, 278, 280, 283, 285, 288, 293, 295,
+ 298, 302, 306, 308, 309, 315, 324, 335, 342, 342,
+ 345, 347, 348, 351, 352, 355, 358, 362, 364, 367,
+ 369, 372, 374, 375, 376, 379, 381, 382, 383, 387,
+ 390, 394, 397, 400, 402, 405, 408, 412, 414, 418,
+ 422, 425, 426, 428, 435, 442, 448, 451, 453, 461,
+ 477, 493, 494, 497, 500, 504, 506, 507, 511, 513,
+ 516, 526, 528, 531, 533, 539, 542, 546, 548, 549,
+ 550, 554, 556, 559, 561, 565, 567, 572, 574, 576,
+ 577, 581, 583, 586, 588, 591, 593, 596, 598, 599,
+ 600, 603, 607, 612, 614, 615, 616, 619, 621, 625,
+ 627, 630, 632, 635, 637, 638, 641, 645, 648, 652,
+ 654, 655, 656, 657, 658, 661, 663, 664, 665, 666,
+ 669, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, 683, 687, 692, 696, 702, 706, 708, 709, 710,
+ 711, 712, 713, 716, 720, 724, 728, 732, 734, 735,
+ 736, 739, 741, 744, 749, 751, 754, 756, 759, 763,
+ 767, 771, 775, 779, 781, 784, 786, 789, 793, 796,
+ 797, 798, 801, 802, 805, 807, 810, 812, 815, 817,
+ 820, 822, 825, 829, 831, 834, 839, 841, 842, 845,
+ 847, 850, 854, 859, 861, 864, 866, 867, 868, 869,
+ 870, 871, 875, 877, 879, 883, 887, 889, 893, 894,
+ 898, 899, 900, 901, 904, 907, 910, 912, 913, 916,
+ 918, 919, 920, 923, 924, 927, 929, 932, 936, 938,
+ 941, 943, 946, 949, 951, 952, 953, 954, 957, 960,
+ 963, 965, 967, 968, 971, 975, 979, 981, 982, 983,
+ 984, 987, 991, 995, 997, 998, 999, 1002, 1004, 1005,
+ 1006, 1009, 1011, 1012, 1013, 1016, 1018, 1019, 1022, 1024,
+ 1025, 1026, 1029, 1031, 1032, 1033, 1034, 1035, 1038, 1040,
+ 1041, 1044, 1046, 1049, 1051, 1054, 1056, 1059, 1061, 1064,
+ 1066, 1069, 1071, 1074, 1076, 1079, 1083, 1086, 1087, 1090,
+ 1092, 1095, 1099
};
#endif
@@ -1374,7 +1375,7 @@ static const short yycheck[] = { 3,
#define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/share/misc/bison.simple"
+#line 3 "/usr/local/gnu/share/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -1391,7 +1392,7 @@ static const short yycheck[] = { 3,
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -1567,7 +1568,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
-#line 196 "/usr/share/misc/bison.simple"
+#line 196 "/usr/local/gnu/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -1872,28 +1873,28 @@ yyreduce:
switch (yyn) {
case 10:
-#line 192 "./parse-scan.y"
+#line 193 "./parse-scan.y"
{
/* use preset global here. FIXME */
yyval.node = xstrdup ("int");
;
break;}
case 11:
-#line 197 "./parse-scan.y"
+#line 198 "./parse-scan.y"
{
/* use preset global here. FIXME */
yyval.node = xstrdup ("double");
;
break;}
case 12:
-#line 202 "./parse-scan.y"
+#line 203 "./parse-scan.y"
{
/* use preset global here. FIXME */
yyval.node = xstrdup ("boolean");
;
break;}
case 19:
-#line 228 "./parse-scan.y"
+#line 229 "./parse-scan.y"
{
char *n = xmalloc (strlen (yyvsp[-2].node)+2);
n [0] = '[';
@@ -1902,7 +1903,7 @@ case 19:
;
break;}
case 20:
-#line 235 "./parse-scan.y"
+#line 236 "./parse-scan.y"
{
char *n = xmalloc (strlen (yyvsp[-2].node)+2);
n [0] = '[';
@@ -1911,7 +1912,7 @@ case 20:
;
break;}
case 24:
-#line 255 "./parse-scan.y"
+#line 256 "./parse-scan.y"
{
char *n = xmalloc (strlen (yyvsp[-2].node)+strlen (yyvsp[0].node)+2);
sprintf (n, "%s.%s", yyvsp[-2].node, yyvsp[0].node);
@@ -1919,11 +1920,11 @@ case 24:
;
break;}
case 38:
-#line 289 "./parse-scan.y"
+#line 290 "./parse-scan.y"
{ package_name = yyvsp[-1].node; ;
break;}
case 46:
-#line 316 "./parse-scan.y"
+#line 317 "./parse-scan.y"
{
if (yyvsp[0].value == PUBLIC_TK)
modifier_value++;
@@ -1933,7 +1934,7 @@ case 46:
;
break;}
case 47:
-#line 324 "./parse-scan.y"
+#line 325 "./parse-scan.y"
{
if (yyvsp[0].value == PUBLIC_TK)
modifier_value++;
@@ -1943,57 +1944,57 @@ case 47:
;
break;}
case 48:
-#line 336 "./parse-scan.y"
+#line 337 "./parse-scan.y"
{
report_class_declaration(yyvsp[-2].node);
modifier_value = 0;
;
break;}
case 50:
-#line 342 "./parse-scan.y"
+#line 343 "./parse-scan.y"
{ report_class_declaration(yyvsp[-2].node); ;
break;}
case 56:
-#line 356 "./parse-scan.y"
+#line 357 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 57:
-#line 358 "./parse-scan.y"
+#line 359 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 70:
-#line 388 "./parse-scan.y"
+#line 389 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 71:
-#line 390 "./parse-scan.y"
+#line 391 "./parse-scan.y"
{ modifier_value = 0; ;
break;}
case 76:
-#line 406 "./parse-scan.y"
+#line 407 "./parse-scan.y"
{ bracket_count = 0; USE_ABSORBER; ;
break;}
case 77:
-#line 408 "./parse-scan.y"
+#line 409 "./parse-scan.y"
{ ++bracket_count; ;
break;}
case 81:
-#line 423 "./parse-scan.y"
+#line 424 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 83:
-#line 426 "./parse-scan.y"
+#line 427 "./parse-scan.y"
{ modifier_value = 0; ;
break;}
case 84:
-#line 428 "./parse-scan.y"
+#line 429 "./parse-scan.y"
{
report_main_declaration (yyvsp[-1].declarator);
modifier_value = 0;
;
break;}
case 85:
-#line 436 "./parse-scan.y"
+#line 437 "./parse-scan.y"
{
struct method_declarator *d;
NEW_METHOD_DECLARATOR (d, yyvsp[-2].node, NULL);
@@ -2001,7 +2002,7 @@ case 85:
;
break;}
case 86:
-#line 442 "./parse-scan.y"
+#line 443 "./parse-scan.y"
{
struct method_declarator *d;
NEW_METHOD_DECLARATOR (d, yyvsp[-3].node, yyvsp[-1].node);
@@ -2009,7 +2010,7 @@ case 86:
;
break;}
case 89:
-#line 453 "./parse-scan.y"
+#line 454 "./parse-scan.y"
{
char *n = xmalloc (strlen (yyvsp[-2].node)+strlen(yyvsp[0].node)+2);
sprintf (n, "%s,%s", yyvsp[-2].node, yyvsp[0].node);
@@ -2017,7 +2018,7 @@ case 89:
;
break;}
case 90:
-#line 462 "./parse-scan.y"
+#line 463 "./parse-scan.y"
{
USE_ABSORBER;
if (bracket_count)
@@ -2034,7 +2035,7 @@ case 90:
;
break;}
case 91:
-#line 477 "./parse-scan.y"
+#line 478 "./parse-scan.y"
{
if (bracket_count)
{
@@ -2050,104 +2051,104 @@ case 91:
;
break;}
case 94:
-#line 498 "./parse-scan.y"
+#line 499 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 95:
-#line 500 "./parse-scan.y"
+#line 501 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 101:
-#line 517 "./parse-scan.y"
+#line 518 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 103:
-#line 528 "./parse-scan.y"
+#line 529 "./parse-scan.y"
{ modifier_value = 0; ;
break;}
case 105:
-#line 533 "./parse-scan.y"
+#line 534 "./parse-scan.y"
{ modifier_value = 0; ;
break;}
case 106:
-#line 540 "./parse-scan.y"
+#line 541 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 107:
-#line 542 "./parse-scan.y"
+#line 543 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 114:
-#line 559 "./parse-scan.y"
+#line 560 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 115:
-#line 561 "./parse-scan.y"
+#line 562 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 119:
-#line 574 "./parse-scan.y"
+#line 575 "./parse-scan.y"
{ modifier_value = 0; ;
break;}
case 121:
-#line 577 "./parse-scan.y"
+#line 578 "./parse-scan.y"
{ modifier_value = 0; ;
break;}
case 148:
-#line 646 "./parse-scan.y"
+#line 647 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 149:
-#line 648 "./parse-scan.y"
+#line 649 "./parse-scan.y"
{ modifier_value = 0; ;
break;}
case 173:
-#line 688 "./parse-scan.y"
+#line 689 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 226:
-#line 835 "./parse-scan.y"
+#line 836 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 243:
-#line 875 "./parse-scan.y"
+#line 876 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 244:
-#line 877 "./parse-scan.y"
+#line 878 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 246:
-#line 883 "./parse-scan.y"
+#line 884 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 255:
-#line 905 "./parse-scan.y"
+#line 906 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 273:
-#line 947 "./parse-scan.y"
+#line 948 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 274:
-#line 949 "./parse-scan.y"
+#line 950 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 279:
-#line 958 "./parse-scan.y"
+#line 959 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 282:
-#line 965 "./parse-scan.y"
+#line 966 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
case 337:
-#line 1084 "./parse-scan.y"
+#line 1085 "./parse-scan.y"
{ USE_ABSORBER; ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/share/misc/bison.simple"
+#line 498 "/usr/local/gnu/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@@ -2343,7 +2344,7 @@ yyerrhandle:
yystate = yyn;
goto yynewstate;
}
-#line 1102 "./parse-scan.y"
+#line 1103 "./parse-scan.y"
#include "lex.c"
@@ -2423,7 +2424,7 @@ void reset_report ()
void
yyerror (msg)
- char *msg;
+ char *msg ATTRIBUTE_UNUSED;
{
}
diff --git a/gcc/java/parse-scan.y b/gcc/java/parse-scan.y
index 25f87c8..a8f6df6 100644
--- a/gcc/java/parse-scan.y
+++ b/gcc/java/parse-scan.y
@@ -41,6 +41,7 @@ definitions and other extensions. */
#include "system.h"
#include "obstack.h"
+#include "toplev.h"
extern char *input_filename;
extern FILE *finput, *out;
@@ -1178,7 +1179,7 @@ void reset_report ()
void
yyerror (msg)
- char *msg;
+ char *msg ATTRIBUTE_UNUSED;
{
}
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index fa6b338eb..5326669 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -594,7 +594,7 @@ struct parser_ctxt {
tree current_class; /* Current class */
tree current_function_decl; /* Current function decl, save/restore */
- JCF *current_jcf; /* CU jcf */
+ struct JCF *current_jcf; /* CU jcf */
int prevent_ese; /* Prevent expression statement error */
int class_err; /* Flag to report certain errors */
@@ -652,8 +652,11 @@ extern tree do_resolve_class PROTO ((tree, tree, tree));
void java_push_parser_context PROTO ((void));
void java_pop_parser_context PROTO ((int));
void java_init_lex PROTO ((void));
+extern void java_parser_context_save_global PROTO ((void));
+extern void java_parser_context_restore_global PROTO ((void));
int yyparse PROTO ((void));
+extern int java_parse PROTO ((void));
int yylex ();
void yyerror PROTO ((char *));
-
+extern void java_expand_classes PROTO ((void));
#endif
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 1d544e6..d52d7fd 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -66,7 +66,7 @@ static tree
convert_ieee_real_to_integer (type, expr)
tree type, expr;
{
- tree node, assignment, expr_decl;
+ tree assignment, expr_decl;
expr = save_expr (expr);
return build (COND_EXPR, type,