James wrote:

> -> 2) Returning a type other than the declared value for the return type:
> -> for exaple, the function:
> -> 
> ->     int foo()
> ->     {
> ->        float y;
> -> 
> ->        return y;
> ->      }
> -> 
> -> would generate an error because it's retuurning type float where an int is 
>expected.
> -
> -This won't generate an error (unless your compiler is seriously
> -broken). The return value will be silently converted to an int.
> 
> gcc -Wall would point out (and 'fix') this wouldn't it?

No. There's nothing that warrants a warning, or needs to be fixed.
Implicit casts between numeric types are perfectly valid.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to