parse.y (simple_name:): Reject `$' in type names.
authorAlexandre Petit-Bianco <apbianco@cygnus.com>
Sat, 22 Jul 2000 00:50:14 +0000 (00:50 +0000)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Sat, 22 Jul 2000 00:50:14 +0000 (17:50 -0700)
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

gcc/java/ChangeLog
gcc/java/parse.y

index d8f99ad..90de016 100644 (file)
        * 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.
index 93eff86..bd3c5a2 100644 (file)
@@ -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,