OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [format/] [ms_c90-scanf-3.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Test for scanf formats.  Formats using extensions to the standard
2
   should be rejected in strict pedantic mode.
3
*/
4
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
5
/* { dg-do compile { target { *-*-mingw* } } } */
6
/* { dg-options "-std=iso9899:1990 -pedantic -Wformat" } */
7
 
8
#define USE_SYSTEM_FORMATS
9
#include "format.h"
10
 
11
void
12
foo (char **sp, wchar_t **lsp)
13
{
14
  /* %a formats for allocation, only recognized in C90 mode, are a
15
     GNU extension.
16
  */
17
  scanf ("%as", sp); /* { dg-warning "flag" "%as is unsupported" } */
18
  scanf ("%aS", lsp); /* { dg-warning "format|flag" "%aS is unsupported" } */
19
  scanf ("%a[bcd]", sp); /* { dg-warning "flag" "%a[] is unsupported" } */
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.