From 9179646e87d54f448b89d4f0881edf5eb4a1e791 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 21 Jan 2003 18:51:41 +0000 Subject: 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 --- gcc/java/parse.y | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/java/parse.y') 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) { -- cgit v1.1