aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-12-31 03:30:22 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-12-31 03:30:22 +0000
commitc63b98cdad0bfd07d732fffbf6013893a919bfeb (patch)
treef85ebd132a52c9f4368a95dcbccd79d8403b7c9d /gcc/java/parse.y
parent6bafd8b6e9fcf4c7a9606af4fc7965717c43a161 (diff)
downloadgcc-c63b98cdad0bfd07d732fffbf6013893a919bfeb.zip
gcc-c63b98cdad0bfd07d732fffbf6013893a919bfeb.tar.gz
gcc-c63b98cdad0bfd07d732fffbf6013893a919bfeb.tar.bz2
class.c (assume_compiled, [...]): Add static prototype.
* class.c (assume_compiled, assume_compiled_node): Add static prototype. (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup. * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch. * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN. * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier' to `__modifier' to avoid stringifying it. * parse.y (verify_constructor_circularity): Don't call a variadic function with a non-literal format string. (java_check_abstract_methods): Move unreachable code inside `continue' statement. (lookup_method_invoke): Call xstrdup, not strdup. * expr.c (expand_java_field_op): Avoid the use of ANSI string concatenation. * jcf-parse.c (yyparse): Likewise. * jv-scan.c (main): Likewise. From-SVN: r31148
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 9e4b4c0..49118ce 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -3649,7 +3649,7 @@ verify_constructor_circularity (meth, current)
for (liste = list; liste; liste = TREE_CHAIN (liste))
{
parse_error_context
- (TREE_PURPOSE (TREE_PURPOSE (liste)),
+ (TREE_PURPOSE (TREE_PURPOSE (liste)), "%s",
constructor_circularity_msg
(TREE_VALUE (liste), TREE_VALUE (TREE_PURPOSE (liste))));
java_error_count--;
@@ -5015,9 +5015,8 @@ java_check_abstract_methods (interface_decl)
IDENTIFIER_POINTER
(DECL_NAME (TYPE_NAME (DECL_CONTEXT (found)))));
free (t);
- continue;
-
DECL_NAME (found) = saved_found_wfl;
+ continue;
}
}
@@ -7621,7 +7620,7 @@ lookup_method_invoke (lc, cl, class, name, arg_list)
method = make_node (FUNCTION_TYPE);
TYPE_ARG_TYPES (method) = atl;
signature = build_java_argument_signature (method);
- dup = strdup (lang_printable_name (class, 0));
+ dup = xstrdup (lang_printable_name (class, 0));
parse_error_context (cl, "Can't find %s `%s(%s)' in type `%s'%s",
(lc ? "constructor" : "method"),
(lc ? dup : IDENTIFIER_POINTER (name)),