Commit 55967ba2 by Ranjit Mathew Committed by Ranjit Mathew

re PR java/15543 ("jv-scan --complexity" segfaults)

        PR java/15543
        * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
        (modifiers) when square brackets are present in a declaration for
        a final paramter.
        * jv-scan.c (main): Set input_filename and input_line.

From-SVN: r94598
parent e64e5109
2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
PR java/15543
* parse-scan.y (formal_parameter): Use $2 (type) instead of $$
(modifiers) when square brackets are present in a declaration for
a final paramter.
* jv-scan.c (main): Set input_filename and input_line.
2005-02-01 Tom Tromey <tromey@redhat.com> 2005-02-01 Tom Tromey <tromey@redhat.com>
PR java/19742: PR java/19742:
...@@ -8,7 +16,7 @@ ...@@ -8,7 +16,7 @@
* jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
of unsigned types using iushr and lushr JVM bytecodes. of unsigned types using iushr and lushr JVM bytecodes.
2005-02-02 Ranjit Mathew <rmathew@hotmail.com> 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
PR java/19738 PR java/19738
* gjavah.c (jni_print_float): Do not emit floating-point * gjavah.c (jni_print_float): Do not emit floating-point
......
...@@ -237,6 +237,8 @@ main (int argc, char **argv) ...@@ -237,6 +237,8 @@ main (int argc, char **argv)
if (encoding == NULL || *encoding == '\0') if (encoding == NULL || *encoding == '\0')
encoding = DEFAULT_ENCODING; encoding = DEFAULT_ENCODING;
input_filename = filename;
input_line = 0;
java_init_lex (finput, encoding); java_init_lex (finput, encoding);
ctxp->filename = filename; ctxp->filename = filename;
yyparse (); yyparse ();
......
...@@ -515,10 +515,10 @@ formal_parameter: ...@@ -515,10 +515,10 @@ formal_parameter:
if (bracket_count) if (bracket_count)
{ {
int i; int i;
char *n = xmalloc (bracket_count + 1 + strlen ($$)); char *n = xmalloc (bracket_count + 1 + strlen ($2));
for (i = 0; i < bracket_count; ++i) for (i = 0; i < bracket_count; ++i)
n[i] = '['; n[i] = '[';
strcpy (n + bracket_count, $$); strcpy (n + bracket_count, $2);
$$ = n; $$ = n;
} }
else else
......
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