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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [format/] [c90-scanf-3.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 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 } */
6
/* { dg-options "-std=iso9899:1990 -pedantic -Wformat" } */
7
 
8
#include "format.h"
9
 
10
void
11
foo (char **sp, wchar_t **lsp)
12
{
13
  /* %a formats for allocation, only recognized in C90 mode, are a
14
     GNU extension.
15
  */
16
  scanf ("%as", sp); /* { dg-warning "C" "%as" } */
17
  scanf ("%aS", lsp); /* { dg-warning "C" "%aS" } */
18
  scanf ("%a[bcd]", sp); /* { dg-warning "C" "%a[]" } */
19
}

powered by: WebSVN 2.1.0

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