C - uso do return em função void

Alguem tem uma posição mais clara para o uso do return em função void?
O seu uso seria por rigor, para diagnóstico, ou para evitar algum outro problema que desconheço ?
Exemplo encontrado num artigo do msdn da Microsoft
comentário no msdn:
Aqui parece que o uso do return é para causar uma menssagem de diagnóstico. Penso que isto vai depender do compilador.
No livor do Kernighan & Ritchie (segunda edição pag 61)
Não entendí especialmente essa parte:
It is not illegal, but probably a sign of trouble, if a function returns a value
from one place and no value from another.
Enfim, devemos colocar return no final de uma função void ? Por que ?
O seu uso seria por rigor, para diagnóstico, ou para evitar algum outro problema que desconheço ?
- Código: Selecionar todos
void nome(void)
{
/*corpo da função*/
return; /*este return aqui. Para que serve de fato ? */
}
Exemplo encontrado num artigo do msdn da Microsoft
- Código: Selecionar todos
void draw( int I, long L );
long sq( int s );
int main()
{
long y;
int x;
y = sq( x );
draw( x, y );
return();
}
long sq( int s )
{
return( s * s );
}
void draw( int I, long L )
{
/* Statements defining the draw function here */
return;
}
comentário no msdn:
The draw function is declared as a void function and does not return a value. An attempt to assign the return value of draw would cause a diagnostic message to be issued.
Aqui parece que o uso do return é para causar uma menssagem de diagnóstico. Penso que isto vai depender do compilador.
No livor do Kernighan & Ritchie (segunda edição pag 61)
The calling function is free to ignore the returned value. Furthermore, there need to be no
expression after return; in that case, no value is returned to the caller. Control also returns to
the caller with no value when execution ``falls off the end'' of the function by reaching the
closing right brace. It is not illegal, but probably a sign of trouble, if a function returns a value
from one place and no value from another. In any case, if a function fails to return a value, its
``value'' is certain to be garbage.
Não entendí especialmente essa parte:
It is not illegal, but probably a sign of trouble, if a function returns a value
from one place and no value from another.
Enfim, devemos colocar return no final de uma função void ? Por que ?