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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [format/] [unnamed-1.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Test for warnings with possibly unnamed integer types.  Bug 24329.  */
2
/* Origin: Joseph Myers <joseph@codesourcery.com> */
3
/* { dg-do compile } */
4
/* { dg-options "-Wformat" } */
5
/* { dg-options "-Wformat -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
6
 
7
 
8
#include "format.h"
9
 
10
/* Definition of TItype follows same logic as in gcc.dg/titype-1.c,
11
   but must be a #define to avoid giving the type a name.  */
12
#if defined(__LP64__) && !defined(__hppa__)
13
#define TItype int __attribute__ ((mode (TI)))
14
#else
15
#define TItype long
16
#endif
17
 
18
void
19
f (TItype x)
20
{
21
  printf("%d", x); /* { dg-warning "expects type" } */
22
  printf("%d", 141592653589793238462643383279502884197169399375105820974944); /* { dg-warning "expects type" } */
23
  /* { dg-warning "unsigned only|too large" "constant" { target *-*-* } 22 } */
24
}

powered by: WebSVN 2.1.0

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