|
次のコードは、short-or( )を使用するたびにsegfaultを実行し、short-circuit( )を使用しない場合は問題なくコンパイルされ||
ますか?
を使用してコンパイルgcc -Wall ../IsNull/IsNull.c ../IsEmpty/IsEmpty.c *.c -o IsNullOrEmpty
:
#include <stdbool.h>
#include "../IsNull/IsNull.h"
#include "../IsEmpty/IsEmpty.h"
#include "IsNullOrEmpty.h"
_Bool isNullOrEmpty (char *str);
_Bool isNullOrEmpty (char *str) {
return (isNull (str) | isEmpty (str));
} /* end of isNullOrEmpty() */