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-4.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.  Test that the C90 functions get their default
2
   attributes in strict C90 mode, but the C99 and gettext functions
3
   do not.
4
*/
5
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
6
/* { dg-do compile { target { *-*-mingw* } } } */
7
/* { dg-options "-std=iso9899:1990 -pedantic -Wformat" } */
8
 
9
#define USE_SYSTEM_FORMATS
10
#include "format.h"
11
 
12
void
13
foo (int *ip, char *s, va_list v0, va_list v1, va_list v2, va_list v3,
14
     va_list v4, va_list v5)
15
{
16
  fscanf (stdin, "%d", ip);
17
  fscanf (stdin, "%ld", ip); /* { dg-warning "format" "fscanf" } */
18
  scanf ("%d", ip);
19
  scanf ("%ld", ip); /* { dg-warning "format" "scanf" } */
20
  sscanf (s, "%d", ip);
21
  sscanf (s, "%ld", ip); /* { dg-warning "format" "sscanf" } */
22
  vfscanf (stdin, "%d", v0);
23
  vscanf ("%d", v2);
24
  vsscanf (s, "%d", v4);
25
  scanf (gettext ("%d"), ip);
26
  scanf (gettext ("%ld"), ip);
27
  scanf (dgettext ("", "%d"), ip);
28
  scanf (dgettext ("", "%ld"), ip);
29
  scanf (dcgettext ("", "%d", 0), ip);
30
  scanf (dcgettext ("", "%ld", 0), ip);
31
}

powered by: WebSVN 2.1.0

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