2 #include <libc-internal.h>
7 static const char buf
[] = " ";
10 /* GCC in C99 mode treats %a as the C99 format expecting float *,
11 but glibc with _GNU_SOURCE treats %as as the GNU allocation
12 extension, so resulting in "warning: format '%a' expects argument
13 of type 'float *', but argument 3 has type 'char **'". This
14 applies to the other %as, %aS and %a[] formats below as well. */
15 DIAG_PUSH_NEEDS_COMMENT
;
16 DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat");
17 int r
= sscanf (buf
, "%as", &str
);
18 DIAG_POP_NEEDS_COMMENT
;
19 printf ("%d %p\n", r
, str
);
21 return r
!= -1 || str
!= NULL
;
24 #define TEST_FUNCTION do_test ()
25 #include "../test-skeleton.c"