OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [format/] [ms-format1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Test for printf formats.  Formats using extensions to the standard
2
   should be rejected in strict pedantic mode. But allowed by -Wno-pedantic-ms-format.
3
*/
4
/* Origin: Kai Tietz <kai.tietz@onevision.com> */
5
/* { dg-do compile { target { *-*-mingw* } } } */
6
/* { dg-options "-std=iso9899:1999 -pedantic -Wformat -Wno-pedantic-ms-format" } */
7
 
8
#define USE_SYSTEM_FORMATS
9
#include "format.h"
10
 
11
enum en1 { A=0, B=1 };
12
typedef enum { _A=0, _B=1 } en2;
13
 
14
void
15
foo (int i, long l, long long ll, size_t z, enum en1 e1, en2 e2)
16
{
17
  printf ("%I32d", i);
18
  printf ("%I32d", l);
19
  printf ("%I32d", e1);
20
  printf ("%I32d", e2);
21
  printf ("%I64x", ll);
22
  printf ("%Ix", z);
23
}

powered by: WebSVN 2.1.0

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