summaryrefslogtreecommitdiffstats
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-10 11:59:46 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-10 11:59:46 +0000
commit15654e77b028969933c59e3f71c1dddbedda1869 (patch)
tree18819ebfa553bae0c1f828feced6ab14c1598f05 /gcc/c-typeck.c
parent7f2875d37d990dc70facf8bc99dfe6db01b4a38c (diff)
downloadppe42-gcc-15654e77b028969933c59e3f71c1dddbedda1869.tar.gz
ppe42-gcc-15654e77b028969933c59e3f71c1dddbedda1869.zip
* c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE.
* c-typeck.c (convert_for_assignment): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33058 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 0d395a2b3d4..62a3b256469 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -4082,7 +4082,8 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum)
}
/* Conversions among pointers */
- else if (codel == POINTER_TYPE && coder == POINTER_TYPE)
+ else if ((codel == POINTER_TYPE || codel == REFERENCE_TYPE)
+ && (coder == POINTER_TYPE || coder == REFERENCE_TYPE))
{
register tree ttl = TREE_TYPE (type);
register tree ttr = TREE_TYPE (rhstype);
OpenPOWER on IntegriCloud