Commit 0d34ccb7 by Per Bothner Committed by Per Bothner

lex.h: Moved static function declarations to lex.c, to shut up some -Wall warnings.

�
	* lex.h:  Moved static function declarations to lex.c,
	to shut up some -Wall warnings.
	* lex.c:  Static function declarations moved here.
	* jcf-dump.c:  Small fixes to shut up -Wall warnings.

From-SVN: r24518
parent 90e6a802
Wed Jan 6 16:20:06 1999 Per Bothner <bothner@cygnus.com>
* lex.h: Moved static function declarations to lex.c,
to shut up some -Wall warnings.
* lex.c: Static function declarations moved here.
* jcf-dump.c: Small fixes to shut up -Wall warnings.
Tue Jan 5 22:15:40 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Tue Jan 5 22:15:40 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in ($(GCJ).o): Depend on prefix.h. * Make-lang.in ($(GCJ).o): Depend on prefix.h.
......
...@@ -119,7 +119,7 @@ DEFUN(utf8_equal_string, (jcf, index, value), ...@@ -119,7 +119,7 @@ DEFUN(utf8_equal_string, (jcf, index, value),
#define HANDLE_SOURCEFILE(INDEX) \ #define HANDLE_SOURCEFILE(INDEX) \
{ fprintf (out, "Attribute "); \ { fprintf (out, "Attribute "); \
print_constant_terse (out, jcf, attribute_name, CONSTANT_Utf8); \ print_constant_terse (out, jcf, attribute_name, CONSTANT_Utf8); \
fprintf (out, ", length:%d, #%d=", attribute_length, INDEX); \ fprintf (out, ", length:%ld, #%d=", (long) attribute_length, INDEX); \
print_constant_terse (out, jcf, INDEX, CONSTANT_Utf8); fputc ('\n', out); } print_constant_terse (out, jcf, INDEX, CONSTANT_Utf8); fputc ('\n', out); }
#define HANDLE_CLASS_INFO(ACCESS_FLAGS, THIS, SUPER, INTERFACES_COUNT) \ #define HANDLE_CLASS_INFO(ACCESS_FLAGS, THIS, SUPER, INTERFACES_COUNT) \
...@@ -228,7 +228,7 @@ DEFUN(utf8_equal_string, (jcf, index, value), ...@@ -228,7 +228,7 @@ DEFUN(utf8_equal_string, (jcf, index, value),
#define COMMON_HANDLE_ATTRIBUTE(JCF, INDEX, LENGTH) \ #define COMMON_HANDLE_ATTRIBUTE(JCF, INDEX, LENGTH) \
( fprintf (out, "Attribute "), \ ( fprintf (out, "Attribute "), \
print_constant_terse (out, jcf, INDEX, CONSTANT_Utf8), \ print_constant_terse (out, jcf, INDEX, CONSTANT_Utf8), \
fprintf (out, ", length:%d", LENGTH) ) fprintf (out, ", length:%ld", (long) LENGTH) )
#define HANDLE_CONSTANTVALUE(VALUE_INDEX) \ #define HANDLE_CONSTANTVALUE(VALUE_INDEX) \
( COMMON_HANDLE_ATTRIBUTE(JCF, attribute_name, attribute_length), \ ( COMMON_HANDLE_ATTRIBUTE(JCF, attribute_name, attribute_length), \
...@@ -302,7 +302,7 @@ DEFUN(print_constant_ref, (stream, jcf, index), ...@@ -302,7 +302,7 @@ DEFUN(print_constant_ref, (stream, jcf, index),
fprintf (stream, "out of range"); fprintf (stream, "out of range");
else else
print_constant (stream, jcf, index, 1); print_constant (stream, jcf, index, 1);
fprintf (stream, ">", index); fprintf (stream, ">");
} }
static int static int
...@@ -916,8 +916,6 @@ DEFUN(disassemble_method, (jcf, byte_ops, len), ...@@ -916,8 +916,6 @@ DEFUN(disassemble_method, (jcf, byte_ops, len),
int saw_index; int saw_index;
jlong LONG_temp; jlong LONG_temp;
jint INT_temp; jint INT_temp;
jfloat FLOAT_temp;
jdouble DOUBLE_temp;
switch (byte_ops[PC++]) switch (byte_ops[PC++])
{ {
...@@ -946,10 +944,10 @@ DEFUN(disassemble_method, (jcf, byte_ops, len), ...@@ -946,10 +944,10 @@ DEFUN(disassemble_method, (jcf, byte_ops, len),
/* Print out operand (if not implied by the opcode) for PUSCH opcodes. /* Print out operand (if not implied by the opcode) for PUSCH opcodes.
These all push a constant onto the opcode stack. */ These all push a constant onto the opcode stack. */
#define PUSHC(OPERAND_TYPE, OPERAND_VALUE) \ #define PUSHC(OPERAND_TYPE, OPERAND_VALUE) \
saw_index = 0, INT_temp = (OPERAND_VALUE); \ saw_index = 0, i = (OPERAND_VALUE); \
if (oldpc+1 == PC) /* nothing */; \ if (oldpc+1 == PC) /* nothing */; \
else if (saw_index) fprintf (out, " "), print_constant_ref (out, jcf, INT_temp); \ else if (saw_index) fprintf (out, " "), print_constant_ref (out, jcf, i); \
else fprintf (out, " %d", INT_temp); else fprintf (out, " %d", i);
/* Print out operand (a local variable index) for LOAD opcodes. /* Print out operand (a local variable index) for LOAD opcodes.
These all push local variable onto the opcode stack. */ These all push local variable onto the opcode stack. */
...@@ -1055,11 +1053,11 @@ DEFUN(disassemble_method, (jcf, byte_ops, len), ...@@ -1055,11 +1053,11 @@ DEFUN(disassemble_method, (jcf, byte_ops, len),
SPECIAL_##OPERAND_VALUE(OPERAND_TYPE) SPECIAL_##OPERAND_VALUE(OPERAND_TYPE)
#define SPECIAL_IINC(OPERAND_TYPE) \ #define SPECIAL_IINC(OPERAND_TYPE) \
INT_temp = saw_wide ? IMMEDIATE_u2 : IMMEDIATE_u1; \ i = saw_wide ? IMMEDIATE_u2 : IMMEDIATE_u1; \
fprintf (out, " %d", INT_temp); \ fprintf (out, " %d", i); \
INT_temp = saw_wide ? IMMEDIATE_s2 : IMMEDIATE_s1; \ INT_temp = saw_wide ? IMMEDIATE_s2 : IMMEDIATE_s1; \
saw_wide = 0; \ saw_wide = 0; \
fprintf (out, " %d", INT_temp) fprintf (out, " %d", i)
#define SPECIAL_WIDE(OPERAND_TYPE) \ #define SPECIAL_WIDE(OPERAND_TYPE) \
saw_wide = 1; saw_wide = 1;
......
...@@ -55,6 +55,25 @@ Addison Wesley 1996" (http://java.sun.com/docs/books/jls/html/3.doc.html) */ ...@@ -55,6 +55,25 @@ Addison Wesley 1996" (http://java.sun.com/docs/books/jls/html/3.doc.html) */
extern struct obstack *expression_obstack; extern struct obstack *expression_obstack;
#endif #endif
/* Function declaration */
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));
static int java_is_eol PROTO ((FILE *, int));
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));
static int java_parse_doc_section PROTO ((unicode_t));
static void java_parse_end_comment PROTO (());
static unicode_t java_get_unicode PROTO (());
static unicode_t java_read_unicode PROTO ((int, int *));
static void java_store_unicode PROTO ((struct java_line *, unicode_t, int));
static unicode_t java_read_char PROTO (());
static void java_allocate_new_line PROTO (());
static void java_unget_unicode PROTO (());
static unicode_t java_sneak_unicode PROTO (());
void void
java_init_lex () java_init_lex ()
{ {
......
...@@ -505,23 +505,4 @@ static tree build_wfl_node (); ...@@ -505,23 +505,4 @@ static tree build_wfl_node ();
#define JAVA_READ_BUFFER 256 #define JAVA_READ_BUFFER 256
#define UEOF (unicode_t)0xffff #define UEOF (unicode_t)0xffff
/* Function declaration */
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));
static int java_is_eol PROTO ((FILE *, int));
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));
static int java_parse_doc_section PROTO ((unicode_t));
static void java_parse_end_comment PROTO (());
static unicode_t java_get_unicode PROTO (());
static unicode_t java_read_unicode PROTO ((int, int *));
static void java_store_unicode PROTO ((struct java_line *, unicode_t, int));
static unicode_t java_read_char PROTO (());
static void java_allocate_new_line PROTO (());
static void java_unget_unicode PROTO (());
static unicode_t java_sneak_unicode PROTO (());
#endif #endif
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