| 1 | |
| 2 | |
| 3 |
|
| 4 | [ ! -x "$(command -v "$1")" ] && exit 1
|
| 5 |
|
| 6 | tmp_file=$(mktemp)
|
| 7 | trap "rm -f $tmp_file" EXIT
|
| 8 |
|
| 9 | cat << EOF >$tmp_file
|
| 10 | static inline int u(const int *q)
|
| 11 | {
|
| 12 | __typeof_unqual__(*q) v = *q;
|
| 13 | return v;
|
| 14 | }
|
| 15 | EOF
|
| 16 |
|
| 17 | |
| 18 | |
| 19 | $@ $tmp_file 2>&1 | awk -v c=1 '/error/{c=0}END{print c}'
|