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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [format/] [ms-format2.c] - Blame information for rev 437

Go to most recent revision | 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
#ifdef _WIN64
12
#define XXX "%I64x"
13
#else
14
#define XXX "%I32x"
15
#endif
16
 
17
void
18
foo (float f, double d, void *p)
19
{
20
  printf (XXX, p); /* { dg-warning "format" "bad argument types" } */
21
  printf ("%I32x", f); /* { dg-warning "format" "bad argument types" } */
22
  printf ("%I64x", d); /* { dg-warning "format" "bad argument types" } */
23
}

powered by: WebSVN 2.1.0

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