* method.c (build_overload_value): Handle REFERENCE_TYPE.

From-SVN: r23573
This commit is contained in:
Mark Mitchell 1998-11-08 13:26:38 +00:00 committed by Mark Mitchell
parent ec2288ffe0
commit 5c0aa6d0a0
3 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,7 @@
1998-11-08 Mark Mitchell <mark@markmitchell.com>
* method.c (build_overload_value): Handle REFERENCE_TYPE.
1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
* decl.c (grokdeclarator): Allow namespace-scoped members if they

View File

@ -794,6 +794,10 @@ build_overload_value (type, value, in_template)
}
value = TREE_OPERAND (value, 0);
/* Fall through. */
case REFERENCE_TYPE:
if (TREE_CODE (value) == VAR_DECL)
{
my_friendly_assert (DECL_NAME (value) != 0, 245);

View File

@ -0,0 +1,16 @@
// Build don't link:
int i;
template <void (&FN)()>
void g ()
{
FN ();
}
void h ()
{
i = 7;
}
template void g<h>();