blob: 01aaef9d367e6fb8d3151bb44cac3739f23a2a9c [file] [log] [blame]
njn16eeb4e2005-06-16 03:56:58 +00001#include <stdlib.h>
2#include <string.h>
3
4// The issue here is the same one in memcmptest -- 'strchr' and 'index' are
5// aliases, as are 'strrchr' and 'rindex'. In each case, the shorter name
6// gets preferred, ie. 'index' and 'rindex'.
7
8int main(int argc, char* argv[])
9{
njn256c2142005-06-17 19:28:29 +000010 char *s, *a, *b;
11 s = malloc(sizeof(char));
12
13 // Nb: s[0] is uninitialised, but almost certainly a zero
14
15 a = strchr (s, '1');
16 b = strrchr(s, '1');
17 return 0;//((int)a + (int)b);
njn16eeb4e2005-06-16 03:56:58 +000018}