Opened 7 years ago
Closed 4 years ago
#70 closed defect (invalid)
resolver problesm
Reported by: | pabuhr | Owned by: | Rob |
---|---|---|---|
Priority: | minor | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description
Selects wrong routine to call.
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(); // correctly calls foo1 &j = foo(); // incorrectly calls foo1 instead of foo2 }
@plg2[1]% a.out foo1 foo2 foo1 foo1
Change History (2)
comment:1 Changed 6 years ago by
comment:2 Changed 4 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
Line
int * i = foo(); // correctly calls foo1
is now ambiguous