aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-01-21 18:51:41 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-01-21 18:51:41 +0000
commit9179646e87d54f448b89d4f0881edf5eb4a1e791 (patch)
tree3e25e00c01edd550607dc15918780cf669fd75d4 /gcc/java/parse.y
parent32ca7e0a42d55f18dff58d344f65cca2512320fc (diff)
downloadgcc-9179646e87d54f448b89d4f0881edf5eb4a1e791.zip
gcc-9179646e87d54f448b89d4f0881edf5eb4a1e791.tar.gz
gcc-9179646e87d54f448b89d4f0881edf5eb4a1e791.tar.bz2
parse.y (method_header): Native method can't be strictfp.
* parse.y (method_header): Native method can't be strictfp. No method can be transient or volatile. From-SVN: r61559
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index b618bb2..04c3cb5 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -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)
{