Opened 5 years ago
Last modified 5 years ago
#194 new defect
Ambiguous reference vs pointer return [from ticket #70] — at Initial Version
| Reported by: | Thierry Delisle | Owned by: | |
|---|---|---|---|
| Priority: | major | Component: | cfa-cc |
| Version: | 1.0 | Keywords: | |
| Cc: |
Description
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();
}
This should not be ambiguous, one side is an exact match.
This must be either unambiguous or an error to define both
Note:
See TracTickets
for help on using tickets.