]> git.ipfire.org Git - thirdparty/glibc.git/blame - stdio-common/bug10.c
[powerpc] No need to enter "Ignore Exceptions Mode"
[thirdparty/glibc.git] / stdio-common / bug10.c
CommitLineData
05be689b 1#include <stdio.h>
11336c16
UD
2
3int
1fb05e3d 4main (int arc, char *argv[])
05be689b
RM
5{
6 int n, res;
7 unsigned int val;
11336c16 8 char s[] = "111";
05be689b
RM
9 int result = 0;
10
05be689b
RM
11 n = 0;
12 res = sscanf(s, "%u %n", &val, &n);
13
14 printf("Result of sscanf = %d\n", res);
15 printf("Scanned format %%u = %u\n", val);
16 printf("Possibly scanned format %%n = %d\n", n);
8d57beea 17 result |= res != 1 || val != 111 || n != 3;
05be689b
RM
18
19
20 result |= sscanf ("", " %n", &n) == EOF;
21
22 puts (result ? "Test failed" : "All tests passed");
23
24 return result;
25}