aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1996-09-30 21:34:04 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1996-09-30 21:34:04 +0000
commit3cc0b4b927b943873f4aa7dea40aad5c448f14ba (patch)
tree7df90e2fe04ce0e37b684ebb2fa65e27a632aaa8 /gcc/cp/typeck2.c
parent5da6226800b028774529c6e5b1b06b0b04c23c54 (diff)
89th Cygnus<->FSF quick merge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12883 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r--gcc/cp/typeck2.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 16b29dc0c5d..786ca79706c 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -607,6 +607,10 @@ store_init_value (decl, init)
}
}
+ if (TYPE_PTRMEMFUNC_P (type) && TREE_CODE (init) == CONSTRUCTOR
+ && TREE_TYPE (init) == NULL_TREE)
+ cp_pedwarn ("initializer list for `%T'", type);
+
/* End of special C++ code. */
/* Digest the specified initializer into an expression. */
@@ -1011,9 +1015,6 @@ process_init_constructor (type, init, elts)
sorry ("initializer list for object using virtual functions");
return error_mark_node;
}
-
- if (TYPE_PTRMEMFUNC_P (type))
- cp_pedwarn ("initializer list for `%T'", type);
}
for (field = TYPE_FIELDS (type); field && tail;
@@ -1262,7 +1263,7 @@ build_x_arrow (datum)
if (type == error_mark_node)
return error_mark_node;
- if (current_template_parms)
+ if (processing_template_decl)
return build_min_nt (ARROW_EXPR, rval);
if (TREE_CODE (rval) == OFFSET_REF)
@@ -1338,7 +1339,7 @@ build_m_component_ref (datum, component)
tree rettype;
tree binfo;
- if (current_template_parms)
+ if (processing_template_decl)
return build_min_nt (DOTSTAR_EXPR, datum, component);
if (TYPE_PTRMEMFUNC_P (TREE_TYPE (component)))
@@ -1423,7 +1424,7 @@ build_functional_cast (exp, parms)
else
type = exp;
- if (current_template_parms)
+ if (processing_template_decl)
return build_min (CAST_EXPR, type, parms);
if (IS_SIGNATURE (type))