Commit 7610f2ce by Jason Merrill Committed by Jason Merrill

pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a template.

        * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
        template.

        * decl2.c (mark_used): Do instantiate inlines that have been
        explicitly instantiated.

From-SVN: r31601
parent 6d4e202e
2000-01-24 Jason Merrill <jason@casey.cygnus.com>
* pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
template.
* decl2.c (mark_used): Do instantiate inlines that have been
explicitly instantiated.
2000-01-24 Richard Henderson <rth@cygnus.com> 2000-01-24 Richard Henderson <rth@cygnus.com>
* call.c (build_over_call): Use expand_tree_builtin. * call.c (build_over_call): Use expand_tree_builtin.
......
...@@ -5202,7 +5202,8 @@ mark_used (decl) ...@@ -5202,7 +5202,8 @@ mark_used (decl)
instantiation because that is not checked in instantiate_decl. */ instantiation because that is not checked in instantiate_decl. */
if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL)
&& DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl) && DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl)
&& !DECL_EXPLICIT_INSTANTIATION (decl)) && (!DECL_EXPLICIT_INSTANTIATION (decl)
|| (TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl))))
instantiate_decl (decl); instantiate_decl (decl);
} }
......
...@@ -5121,6 +5121,11 @@ static tree ...@@ -5121,6 +5121,11 @@ static tree
maybe_fold_nontype_arg (arg) maybe_fold_nontype_arg (arg)
tree arg; tree arg;
{ {
/* If we're not in a template, ARG is already as simple as it's going to
get, and trying to reprocess the trees will break. */
if (! processing_template_decl)
return arg;
if (TREE_CODE_CLASS (TREE_CODE (arg)) != 't' if (TREE_CODE_CLASS (TREE_CODE (arg)) != 't'
&& !uses_template_parms (arg)) && !uses_template_parms (arg))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment