Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/format/ext-4.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 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" } */ | |
5 | |
6 #include "format.h" | |
7 | |
8 void | |
9 foo (char **sp, wchar_t **lsp) | |
10 { | |
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. | |
14 */ | |
15 scanf ("%as", sp); | |
16 scanf ("%aS", lsp); | |
17 scanf ("%a[bcd]", sp); | |
18 } |