diff options
author | Mike Stump <mrs@gcc.gnu.org> | 1997-06-04 17:31:55 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 1997-06-04 17:31:55 +0000 |
commit | 013bc8afa0020d91a3c4109250c360b02cb372a6 (patch) | |
tree | 69a9c6bdc17b3a806fb028fa06a95dc4fa3e8c63 /gcc | |
parent | 6313a654f751f936d313f265849c76e87515b2c4 (diff) | |
download | gcc-013bc8afa0020d91a3c4109250c360b02cb372a6.zip gcc-013bc8afa0020d91a3c4109250c360b02cb372a6.tar.gz gcc-013bc8afa0020d91a3c4109250c360b02cb372a6.tar.bz2 |
91th Cygnus<->FSF quick merge
From-SVN: r14145
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 22 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 | ||||
-rw-r--r-- | gcc/cp/gxxint.texi | 12 | ||||
-rw-r--r-- | gcc/cp/search.c | 26 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 7 |
5 files changed, 54 insertions, 16 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ccf8c1c..24f3d73 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,25 @@ +Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com> + + * search.c (push_class_decls): A name which ambiguously refers to + several instantiations of the same template just refers to the + template. + +Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com> + + * decl.c (build_enumerator): fix problem with unsigned long + enumerated values being smashed to ints, causing overflow + when computing next enumerated value. (for enum values around + MAX_VAL). + +Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com> + + * typeck.c (build_component_ref): Only call mark_used on a decl. + +Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com> + + * typeck.c (build_c_cast): Make the check for a ptr to function + more specific before possible default_conversion call. + Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com> * except.c (expand_exception_blocks): Simplify and fix and make diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 41e6c15..e4ddd1d 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10836,7 +10836,10 @@ build_enumerator (name, value) /* We have to always copy here; not all INTEGER_CSTs are unshared, and there's no wedding ring. Look at size_int()...*/ value = copy_node (value); +#if 0 + /* To fix MAX_VAL enum consts. (bkoz) */ TREE_TYPE (value) = integer_type_node; +#endif } /* C++ associates enums with global, function, or class declarations. */ diff --git a/gcc/cp/gxxint.texi b/gcc/cp/gxxint.texi index 2c91fbf..3194600 100644 --- a/gcc/cp/gxxint.texi +++ b/gcc/cp/gxxint.texi @@ -487,18 +487,6 @@ FIELD_DECLs @end display -@item DECL_NESTED_TYPENAME -Holds the fully qualified type name. Example, Base::Derived. - -Has values of: - - IDENTIFIER_NODEs - -What things can this be used on: - - TYPE_DECLs - - @item DECL_NAME Has values of: diff --git a/gcc/cp/search.c b/gcc/cp/search.c index fa69754..40a83c1 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -3449,7 +3449,31 @@ push_class_decls (type) { tree node = TREE_VALUE (new); - while (TREE_CODE (node) == TREE_LIST) + if (TREE_CODE (node) == TYPE_DECL + && DECL_ARTIFICIAL (node) + && IS_AGGR_TYPE (TREE_TYPE (node)) + && CLASSTYPE_TEMPLATE_INFO (TREE_TYPE (node))) + { + tree t = CLASSTYPE_TI_TEMPLATE (TREE_TYPE (node)); + tree n = new; + + for (; n; n = TREE_CHAIN (n)) + { + tree d = TREE_VALUE (n); + if (TREE_CODE (d) == TYPE_DECL + && DECL_ARTIFICIAL (node) + && IS_AGGR_TYPE (TREE_TYPE (d)) + && CLASSTYPE_TEMPLATE_INFO (TREE_TYPE (d)) + && CLASSTYPE_TI_TEMPLATE (TREE_TYPE (d)) == t) + /* OK */; + else + break; + } + + if (n == NULL_TREE) + new = t; + } + else while (TREE_CODE (node) == TREE_LIST) node = TREE_VALUE (node); id = DECL_NAME (node); } diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index dd6415b..13ec6dd 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -1865,7 +1865,8 @@ build_component_ref (datum, component, basetype_path, protect) fndecl = build_vfn_ref (&addr, datum, DECL_VINDEX (fndecl)); TREE_TYPE (fndecl) = build_pointer_type (fntype); } - mark_used (fndecl); + else + mark_used (fndecl); return build (OFFSET_REF, TREE_TYPE (fndecl), datum, fndecl); } if (access == access_protected_node) @@ -5501,8 +5502,8 @@ build_c_cast (type, expr) || (TREE_CODE (TREE_TYPE (value)) == METHOD_TYPE /* Don't do the default conversion if we want a pointer to a function. */ - && TREE_CODE (type) != POINTER_TYPE - && TREE_CODE (TREE_TYPE (type)) != FUNCTION_TYPE) + && ! (TREE_CODE (type) == POINTER_TYPE + && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)) || TREE_CODE (TREE_TYPE (value)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (value)) == REFERENCE_TYPE) value = default_conversion (value); |