1ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown#include <stdlib.h>
2ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown#include <string.h>
3ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown
4ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown// The issue here is the same one in memcmptest -- 'strchr' and 'index' are
5ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown// aliases, as are 'strrchr' and 'rindex'.  In each case, the shorter name
6ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown// gets preferred, ie. 'index' and 'rindex'.
7ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown
8ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brownint main(int argc, char* argv[])
9ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown{
10b32f58018498ea2225959b0ba11c18f0c433deefEvgeniy Stepanov   char *s, *a __attribute__((unused)), *b __attribute__((unused));
11ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown   s = malloc(sizeof(char));
12ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown
13ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown   // Nb: s[0] is uninitialised, but almost certainly a zero
14ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown
15ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown   a = strchr (s, '1');
16ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown   b = strrchr(s, '1');
17ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown   return 0;//((int)a + (int)b);
18ed07e00d438c74b7a23c01bfffde77e3968305e4Jeff Brown}
19