* method.c (build_overload_value): Handle REFERENCE_TYPE.
From-SVN: r23573
This commit is contained in:
parent
ec2288ffe0
commit
5c0aa6d0a0
@ -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
|
||||
|
@ -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);
|
||||
|
16
gcc/testsuite/g++.old-deja/g++.pt/ref1.C
Normal file
16
gcc/testsuite/g++.old-deja/g++.pt/ref1.C
Normal 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>();
|
Loading…
x
Reference in New Issue
Block a user