aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-02-18 04:55:07 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-02-18 04:55:07 +0000
commit6b6294f11853a51dd444dbc5ed797c593459be52 (patch)
tree9d4dcd64a3dacde96384e1abe0d301b3d8973403 /gcc/java/parse.y
parentaeb85a152cd80ead8a39d559f71acbc447e7df4e (diff)
downloadgcc-6b6294f11853a51dd444dbc5ed797c593459be52.zip
gcc-6b6294f11853a51dd444dbc5ed797c593459be52.tar.gz
gcc-6b6294f11853a51dd444dbc5ed797c593459be52.tar.bz2
java-tree.h (TYPE_STRICTFP): New macro.
* java-tree.h (TYPE_STRICTFP): New macro. (struct lang_type) [strictfp]: New field. (CLASS_STRICTFP): New macro. (METHOD_STRICTFP): New macro. (struct lang_decl) [strictfp]: New field. * parse.y (method_header): Disallow strictfp constructor or abstract method. (STRICT_TK): Move before MODIFIER_TK. * parse.h (CLASS_MODIFIERS): Added ACC_STRICT. (METHOD_MODIFIERS): Likewise. (INTERFACE_MODIFIERS): Likewise. * jcf-write.c (get_access_flags): Likewise. * class.c (set_class_decl_access_flags): Recognize ACC_STRICT. (add_method_1): Likewise. (get_access_flags_from_decl): Likewise. * jcf-dump.c (print_access_flags): Print in standard order. Also, recognize strictfp flag. * jcf.h (ACC_STRICT): New define. From-SVN: r49834
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 59559d3..b3e9189 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -482,8 +482,8 @@ static tree src_parse_roots[1];
%token PUBLIC_TK PRIVATE_TK PROTECTED_TK
%token STATIC_TK FINAL_TK SYNCHRONIZED_TK
%token VOLATILE_TK TRANSIENT_TK NATIVE_TK
-%token PAD_TK ABSTRACT_TK MODIFIER_TK
-%token STRICT_TK
+%token PAD_TK ABSTRACT_TK STRICT_TK
+%token MODIFIER_TK
/* Keep those two in order, too */
%token DECR_TK INCR_TK
@@ -4543,7 +4543,8 @@ method_header (flags, type, mdecl, throws)
ABSTRACT_CHECK (flags, ACC_STATIC, id, "Static");
ABSTRACT_CHECK (flags, ACC_FINAL, id, "Final");
ABSTRACT_CHECK (flags, ACC_NATIVE, id, "Native");
- ABSTRACT_CHECK (flags, ACC_SYNCHRONIZED,id, "Synchronized");
+ ABSTRACT_CHECK (flags, ACC_SYNCHRONIZED, id, "Synchronized");
+ ABSTRACT_CHECK (flags, ACC_STRICT, id, "Strictfp");
if (!CLASS_ABSTRACT (TYPE_NAME (this_class))
&& !CLASS_INTERFACE (TYPE_NAME (this_class)))
parse_error_context
@@ -4569,6 +4570,7 @@ method_header (flags, type, mdecl, throws)
JCONSTRUCTOR_CHECK (flags, ACC_FINAL, id, "final");
JCONSTRUCTOR_CHECK (flags, ACC_NATIVE, id, "native");
JCONSTRUCTOR_CHECK (flags, ACC_SYNCHRONIZED, id, "synchronized");
+ JCONSTRUCTOR_CHECK (flags, ACC_STRICT, id, "strictfp");
}
/* If we found error here, we don't consider it's OK to tread
the method definition as a constructor, for the rest of this