mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 02:04:47 +08:00
tree.c (mapcar): When dealing with a DECL, use it's constant value, if any.
� * tree.c (mapcar): When dealing with a DECL, use it's constant value, if any. * pt.c (lookup_template_class): Don't mangle the names of template classes whose arguments are unknown. * pt.c (tsubst_expr): Handle GOTO_STMT correctly. From-SVN: r18803
This commit is contained in:
parent
d229896557
commit
ae16ec5f2c
@ -1473,8 +1473,18 @@ mapcar (t, func)
|
||||
/* Rather than aborting, return error_mark_node. This allows us
|
||||
to report a sensible error message on code like this:
|
||||
|
||||
void g() { int i; f<i>(7); } */
|
||||
return error_mark_node;
|
||||
void g() { int i; f<i>(7); }
|
||||
|
||||
In a case like:
|
||||
|
||||
void g() { const int i = 7; f<i>(7); }
|
||||
|
||||
however, we must actually return the constant initializer. */
|
||||
tmp = decl_constant_value (t);
|
||||
if (tmp != t)
|
||||
return mapcar (tmp, func);
|
||||
else
|
||||
return error_mark_node;
|
||||
|
||||
case PARM_DECL:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user