diff options
author | Alexandre Petit-Bianco <apbianco@cygnus.com> | 2000-07-22 00:50:14 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2000-07-21 17:50:14 -0700 |
commit | 4142b247014131a195c9d1f7f93a23a224ba0a39 (patch) | |
tree | ce409a43328e512a9467856be512d3052f4f7cea /gcc | |
parent | 0c978c46861fdb68b598ffb95e0d703545e22bdb (diff) | |
download | gcc-4142b247014131a195c9d1f7f93a23a224ba0a39.zip gcc-4142b247014131a195c9d1f7f93a23a224ba0a39.tar.gz gcc-4142b247014131a195c9d1f7f93a23a224ba0a39.tar.bz2 |
parse.y (simple_name:): Reject `$' in type names.
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.
(Fixes gcj/257: http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00869.html)
From-SVN: r35182
Diffstat (limited to 'gcc')
-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, |