diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-01 11:51:41 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-01 11:51:41 +0000 |
commit | eae9825cf5d88be45b0d61f9036321dbcae961e0 (patch) | |
tree | 400b9f9fd8b41251123a9243ffd11612ec74dd55 /gcc/cp/search.c | |
parent | 25957c46d49f4985d042dc762e7a3cd5c8f453d9 (diff) | |
download | gcc-eae9825cf5d88be45b0d61f9036321dbcae961e0.tar.gz |
* decl.c (lookup_name_real): Also do implicit typename thing for
artificial TYPE_DECLs.
* search.c (lookup_field): Likewise.
(lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
* semantics.c (begin_constructor_declarator): Use enter_scope_of.
(enter_scope_of): Extract type from implicit typename.
(begin_class_definition): Likewise.
* lex.c (identifier_type): Handle implicit typename when checking
for SELFNAME.
* cp-tree.h: Declare flag_strict_prototype.
* lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
-fstrict-prototype.
* decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
specified, set it to the value of pedantic.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22158 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index fa3109daac6..1c3a187abeb 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -1030,9 +1030,12 @@ lookup_field (xbasetype, name, protect, want_type) basetype_chain = TREE_CHAIN (basetype_chain); basetype_path = TREE_VALUE (basetype_chain); if (TREE_CHAIN (basetype_chain)) - my_friendly_assert (BINFO_INHERITANCE_CHAIN (basetype_path) - == TREE_VALUE (TREE_CHAIN (basetype_chain)), - 980827); + my_friendly_assert + ((BINFO_INHERITANCE_CHAIN (basetype_path) + == TREE_VALUE (TREE_CHAIN (basetype_chain))) + /* We only approximate base info for partial instantiations. */ + || current_template_parms, + 980827); else my_friendly_assert (BINFO_INHERITANCE_CHAIN (basetype_path) == NULL_TREE, 980827); @@ -1187,7 +1190,6 @@ lookup_field (xbasetype, name, protect, want_type) /* Do implicit typename stuff. */ if (rval && TREE_CODE (rval) == TYPE_DECL - && ! DECL_ARTIFICIAL (rval) && processing_template_decl && ! currently_open_class (BINFO_TYPE (rval_binfo)) && uses_template_parms (type)) @@ -1480,9 +1482,12 @@ lookup_fnfields (basetype_path, name, complain) basetype_chain = TREE_CHAIN (basetype_chain); basetype_path = TREE_VALUE (basetype_chain); if (TREE_CHAIN (basetype_chain)) - my_friendly_assert (BINFO_INHERITANCE_CHAIN (basetype_path) - == TREE_VALUE (TREE_CHAIN (basetype_chain)), - 980827); + my_friendly_assert + ((BINFO_INHERITANCE_CHAIN (basetype_path) + == TREE_VALUE (TREE_CHAIN (basetype_chain))) + /* We only approximate base info for partial instantiations. */ + || current_template_parms, + 980827); else my_friendly_assert (BINFO_INHERITANCE_CHAIN (basetype_path) == NULL_TREE, 980827); |