aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.h
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-04-21 16:03:19 -0700
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-04-21 16:03:19 -0700
commita40d21da8f16783007aa8af78f2dae948b178542 (patch)
tree405703f4d7cbd7c926b3a4860ef278bf8c5e1c67 /gcc/java/parse.h
parent7277f72df9c5ce236fbab10119e4cee60b620dc0 (diff)
downloadgcc-a40d21da8f16783007aa8af78f2dae948b178542.zip
gcc-a40d21da8f16783007aa8af78f2dae948b178542.tar.gz
gcc-a40d21da8f16783007aa8af78f2dae948b178542.tar.bz2
[multiple changes]
Thu Apr 20 17:41:28 2000 Mo DeJong <mdejong@cygnus.com> * parse.h (INTERFACE_INNER_MODIFIERS): New macro. * parse.y (check_class_interface_creation): Fixed comments. Select permitted modifiers for (inner) interfaces. Changed error message to report rejected modifiers used with local classes. 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes of directly inherited type considered in scope. * parse.y (do_resolve_class): Search inherited classes for inner classes. (This fixes the PR #194 and #197: http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00008.html http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00011.html) From-SVN: r33330
Diffstat (limited to 'gcc/java/parse.h')
-rw-r--r--gcc/java/parse.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index b19edbe..249fa9b 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -79,6 +79,7 @@ extern tree stabilize_reference PARAMS ((tree));
#define METHOD_MODIFIERS ACC_PUBLIC|ACC_PROTECTED|ACC_PRIVATE|ACC_ABSTRACT| \
ACC_STATIC|ACC_FINAL|ACC_SYNCHRONIZED|ACC_NATIVE
#define INTERFACE_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT
+#define INTERFACE_INNER_MODIFIERS ACC_PUBLIC|ACC_PROTECTED|ACC_PRIVATE|ACC_ABSTRACT|ACC_STATIC
#define INTERFACE_METHOD_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT
#define INTERFACE_FIELD_MODIFIERS ACC_PUBLIC|ACC_STATIC|ACC_FINAL
@@ -827,10 +828,12 @@ struct parser_ctxt {
context. */
#define INNER_ENCLOSING_SCOPE_CHECK(T) \
(INNER_CLASS_TYPE_P ((T)) && !ANONYMOUS_CLASS_P ((T)) \
- /* We have a this and it's not the right one */ \
&& ((current_this \
+ /* We have a this and it's not the right one */ \
&& (DECL_CONTEXT (TYPE_NAME ((T))) \
- != TYPE_NAME (TREE_TYPE (TREE_TYPE (current_this))))) \
+ != TYPE_NAME (TREE_TYPE (TREE_TYPE (current_this)))) \
+ && !inherits_from_p (TREE_TYPE (TREE_TYPE (current_this)), \
+ TREE_TYPE (DECL_CONTEXT (TYPE_NAME (T))))) \
/* We don't have a this. */ \
|| !current_this))