mirror of
https://review.haiku-os.org/buildtools
synced 2025-02-22 13:47:44 +01:00
[taken from gcc-2.96]
2001-01-11 Nathan Sidwell <nathan@codesourcery.com> * typeck.c (build_c_cast): Do template processing earlier. 2001-08-09 Jakub Jelinek <jakub@redhat.com> * g++.old-deja/g++.other/array3.C: New test. git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9602 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c4c981ccea
commit
823a7d17d5
@ -5710,6 +5710,13 @@ build_c_cast (type, expr)
|
||||
if (type == error_mark_node || expr == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
if (processing_template_decl)
|
||||
{
|
||||
tree t = build_min (CAST_EXPR, type,
|
||||
min_tree_cons (NULL_TREE, value, NULL_TREE));
|
||||
return t;
|
||||
}
|
||||
|
||||
/* build_c_cast puts on a NOP_EXPR to make the result not an lvalue.
|
||||
Strip such NOP_EXPRs if VALUE is being used in non-lvalue context. */
|
||||
if (TREE_CODE (type) != REFERENCE_TYPE
|
||||
@ -5751,13 +5758,6 @@ build_c_cast (type, expr)
|
||||
return error_mark_node;
|
||||
}
|
||||
|
||||
if (processing_template_decl)
|
||||
{
|
||||
tree t = build_min (CAST_EXPR, type,
|
||||
min_tree_cons (NULL_TREE, value, NULL_TREE));
|
||||
return t;
|
||||
}
|
||||
|
||||
/* Convert functions and arrays to pointers and
|
||||
convert references to their expanded types,
|
||||
but don't convert any other types. If, however, we are
|
||||
|
Loading…
x
Reference in New Issue
Block a user