Control reaches end of non-void function: why only a warning?

Pierre Sarrazin
Wed Nov 16 14:41:00 GMT 2005

Dixit Ryan Mansfield (2005-11-15 20:05):
> There could be a function with a control flow that returns something useful
> in one path and something meaningless in another. Or a function calls
> another function that never returns (exit example).  It is more important
> for a compiler to follow the language standard and accept valid source than
> it is to have a compiler that tries to enforce good programming practises
> and design.

I see.  Can you cite some document that confirms that this indeed
complies with the standard?  I'm trying to read more about this.

Pierre Sarrazin <sarrazip at sympatico dot ca>

More information about the Gcc-help mailing list