OSDN Git Service

* parse.y (method_header): Native method can't be strictfp.
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Jan 2003 18:51:41 +0000 (18:51 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Jan 2003 18:51:41 +0000 (18:51 +0000)
No method can be transient or volatile.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61559 138bc75d-0d04-0410-961f-82ee72b054a4

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

index dc22d29..c5b1b6e 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 b618bb2..04c3cb5 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)
     {