#include <stdio.h>
#include <stdbool.h>
void func( int arg, bool useReturn)
{
printf ( "func(%d,%d);\n " , arg
, useReturn
) ; if ( arg == 1 )
{
if ( useReturn)
return ;
}
if ( arg != 1 )
{
printf ( "arg isn't 1 - %d\n " , arg
) ; }
if ( useReturn)
return ;
printf ( "I'm last statement in function.\n " ) ;
}
int main( void ) {
func( 1 , true ) ;
func( 2 , true ) ;
func( 1 , false ) ;
func( 2 , false ) ;
return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRib29sLmg+Cgp2b2lkIGZ1bmMoaW50IGFyZywgYm9vbCB1c2VSZXR1cm4pCnsKCXByaW50ZigiZnVuYyglZCwlZCk7XG4iLCBhcmcsIHVzZVJldHVybik7CglpZihhcmcgPT0gMSkKCXsKCQlwcmludGYoImFyZyBpcyAxXG4iKTsKCQlpZih1c2VSZXR1cm4pCgkJCXJldHVybjsKCX0KCQoJaWYoYXJnICE9IDEpCgl7CgkJcHJpbnRmKCJhcmcgaXNuJ3QgMSAtICVkXG4iLCBhcmcpOwoJfQoJCglpZih1c2VSZXR1cm4pCgkJcmV0dXJuOwoJCglwcmludGYoIkknbSBsYXN0IHN0YXRlbWVudCBpbiBmdW5jdGlvbi5cbiIpOwoJCQp9CgppbnQgbWFpbih2b2lkKSB7CglmdW5jKDEsIHRydWUpOwoJZnVuYygyLCB0cnVlKTsKCQoJZnVuYygxLCBmYWxzZSk7CglmdW5jKDIsIGZhbHNlKTsKCQoJcmV0dXJuIDA7Cn0K