parse.y (method_header): Native method can't be strictfp.
authorTom Tromey <tromey@redhat.com>
Tue, 21 Jan 2003 18:51:41 +0000 (18:51 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 21 Jan 2003 18:51:41 +0000 (18:51 +0000)
* parse.y (method_header): Native method can't be strictfp.
No method can be transient or volatile.

From-SVN: r61559

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

index dc22d2975e3a05735d49e21cf55e59684b5d9295..c5b1b6e4cfb0c3eb056d452ba0e88f957049d68c 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-21  Tom Tromey  <tromey@redhat.com>
+
+       * parse.y (method_header): Native method can't be strictfp.
+       No method can be transient or volatile.
+
 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        Make-lang.in (jvspec.o-warn): Add -Wno-error.
index b618bb273ada603696bb47c17c2cd15435728ef9..04c3cb564ea2cb6ece77cfa1b35cd5eb333656be 100644 (file)
@@ -4503,6 +4503,18 @@ method_header (int flags, tree type, tree mdecl, tree throws)
           IDENTIFIER_POINTER (EXPR_WFL_NODE (id)));
     }
 
+  /* A native method can't be strictfp.  */
+  if ((flags & ACC_NATIVE) && (flags & ACC_STRICT))
+    parse_error_context (id, "native method `%s' can't be strictfp",
+                        IDENTIFIER_POINTER (EXPR_WFL_NODE (id)));
+  /* No such thing as a transient or volatile method.  */
+  if ((flags & ACC_TRANSIENT))
+    parse_error_context (id, "method `%s' can't be transient",
+                        IDENTIFIER_POINTER (EXPR_WFL_NODE (id)));
+  if ((flags & ACC_VOLATILE))
+    parse_error_context (id, "method `%s' can't be volatile",
+                        IDENTIFIER_POINTER (EXPR_WFL_NODE (id)));
+
   /* Things to be checked when declaring a constructor */
   if (!type)
     {