﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
51	Reference assignment allows pointer conversions	Rob Schluntz	Rob Schluntz	"{{{
forall( dtype T | sized(T) ) T * foo( void ) {
    printf( ""foo1\n"" );
    return (T *)0;
}
forall( dtype T | sized(T) ) T & foo( void ) {
    printf( ""foo2\n"" );
    return (T &)*(T *)0;
}
int main( void ) {
    int * i = foo(); // correctly calls foo1
    int & j = foo(); // correctly calls foo2

    i = foo();  // incorrectly calls foo2 instead of foo1
    printf( ""fred\n"" ); // never gets here
    &j = foo();  // correctly calls foo2
}
}}}
The call `i = foo()` incorrectly attempts to convert `i` to `void *`."	defect	closed	major	cfa-cc	1.0	fixed		
