2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / format / ext-4.c
blobc11c0ada7de20635134c8df53f7c902f74d19d44
1 /* Test for scanf formats. %a extensions. */
2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "-std=gnu89 -Wformat" } */
6 #include "format.h"
8 void
9 foo (char **sp, wchar_t **lsp)
11 /* %a formats for allocation, only recognized in C90 mode, are a
12 GNU extension. Followed by other characters, %a is not treated
13 specially.
15 scanf ("%as", sp);
16 scanf ("%aS", lsp);
17 scanf ("%a[bcd]", sp);