diff options
| -rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/java/parse.y | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index d8f99ad..90de016 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -13,6 +13,12 @@ * parse.y (find_as_inner_class): Handle the case where the enclosing context of an innerclass has been loaded as bytecode. +2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com> + + * parse.y (simple_name:): Reject `$' in type names. + (resolve_type_during_patch): Use `type' as a second + argument to resolve_no_layout. Fixes gcj/257. + 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com> * lang-specs.h: Added %(jc1) to java compiler options. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 93eff86..bd3c5a2 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -642,6 +642,11 @@ name: simple_name: identifier /* Default rule */ + { + if (strchr (IDENTIFIER_POINTER (EXPR_WFL_NODE ($$)), '$')) + parse_error_context ($$, "Invalide name `%s'", + IDENTIFIER_POINTER (EXPR_WFL_NODE ($$))); + } ; qualified_name: @@ -13335,7 +13340,7 @@ resolve_type_during_patch (type) { if (unresolved_type_p (type, NULL)) { - tree type_decl = resolve_no_layout (EXPR_WFL_NODE (type), NULL_TREE); + tree type_decl = resolve_no_layout (EXPR_WFL_NODE (type), type); if (!type_decl) { parse_error_context (type, |
