aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.h
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>1998-10-16 19:36:39 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>1998-10-16 12:36:39 -0700
commitc583dd46ad05221ee43832d6845ebeb686492579 (patch)
tree0f92c4b1856c87f2362d17e61e9bd4187423ba40 /gcc/java/parse.h
parent8e52e063afdb17d8d92e5ceb1c03dc915a5a17a3 (diff)
downloadgcc-c583dd46ad05221ee43832d6845ebeb686492579.zip
gcc-c583dd46ad05221ee43832d6845ebeb686492579.tar.gz
gcc-c583dd46ad05221ee43832d6845ebeb686492579.tar.bz2
lex.c (setjmp.h): No longer included.
Fri Oct 16 10:59:01 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> * lex.c (setjmp.h): No longer included. * lex.h (setjmp.h): Included. * parse.h (SET_TYPE_FOR_RESOLUTION): New macro. (duplicate_declaration_error_p): Renamed from duplicate_declaration_error. (build_array_from_name): New function prototype. * parse.y (setjmp.h): No longer included. (variable_declarator_id): Define action. (build_array_from_name): New function. (duplicate_declaration_error_p): Renamed from duplicate_declaration_error. Fixed leading comment. (register_fields): Main `for' loop reorganized. Uses SET_TYPE_FOR_RESOLUTION and build_array_from_name. (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call build_array_from_name. (resolve_class): Set CLASS_LOADED_P on newly build array dimension types. (read_import_dir): Don't try to skip `.' and `..'. (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and build_array_from_name. Main `for' loop reorganized. (resolve_qualified_expression_name): When building access to a field, use the type where the field was found, not its own type. (maybe_access_field): Use field DECL_CONTEXT if the type where the field was found is null. (qualify_ambiguous_name): Sweep through all successive array dimensions. Implements the alternate form `T a[]' of array declarations. Fixes a bug when building access to certain fields. Fixed a compilation warning when lex.h is included from somewhere else than parse.y From-SVN: r23142
Diffstat (limited to 'gcc/java/parse.h')
-rw-r--r--gcc/java/parse.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index b53eaac..7c2b99d 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -399,6 +399,27 @@ static jdeplist *reverse_jdep_list ();
} \
}
+/* if TYPE can't be resolved, obtain something suitable for its
+ resolution (TYPE is saved in SAVE before being changed). and set
+ CHAIN to 1. Otherwise, type is set to something usable. CHAIN is
+ usually used to determine that a new DEP must be installed on TYPE. */
+#define SET_TYPE_FOR_RESOLUTION(TYPE, SAVE, CHAIN) \
+ { \
+ tree returned_type; \
+ (CHAIN) = 0; \
+ if (unresolved_type_p (type, &returned_type)) \
+ { \
+ if (returned_type) \
+ (TYPE) = returned_type; \
+ else \
+ { \
+ (SAVE) = (TYPE); \
+ (TYPE) = obtain_incomplete_type (TYPE); \
+ CHAIN = 1; \
+ } \
+ } \
+ }
+
/* Insert a DECL in the current block */
#define BLOCK_CHAIN_DECL(NODE) \
{ \
@@ -560,7 +581,7 @@ static tree create_class PROTO ((int, tree, tree, tree));
static tree create_interface PROTO ((int, tree, tree));
static tree find_field PROTO ((tree, tree));
static tree lookup_field_wrapper PROTO ((tree, tree));
-static int duplicate_declaration_error PROTO ((tree, tree, tree));
+static int duplicate_declaration_error_p PROTO ((tree, tree, tree));
static void register_fields PROTO ((int, tree, tree));
static tree parser_qualified_classname PROTO ((tree));
static int parser_check_super PROTO ((tree, tree, tree));
@@ -631,6 +652,7 @@ static int valid_method_invocation_conversion_p PROTO ((tree, tree));
static tree try_builtin_assignconv PROTO ((tree, tree, tree));
static tree try_reference_assignconv PROTO ((tree, tree));
static tree build_unresolved_array_type PROTO ((tree));
+static tree build_array_from_name PROTO ((tree, tree, tree, tree *));
static tree build_array_ref PROTO ((int, tree, tree));
static tree patch_array_ref PROTO ((tree, tree, tree));
static tree make_qualified_name PROTO ((tree, tree, int));