Ron Natalie wrote:
> Yes, he is. Since the types don't match, but are convertable, a temporary
> converted value is generated.
There seems to be something wrong anyway: BCC managed to make the type
conversion from long to unsigned long, but then complained about
temporaries being passed, while saying nothing about the automatic
conversion itself. GCC, on the other hand, refused to do the type
conversion and failed to compile.
I am not sure about what the proper behavior should be, but I would hope
that, in a situation like that, the compilers would *warn* both about
the type conversion (since there is a good chance of it being unwanted)
and the creation of temporaries. That way, a user could have a better
idea of where he went wrong.
Regards,
--
Ney André de Mello Zunino
|