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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [format/] [z-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* Test for bugs with %z and %Z formats.  See PRs c/89, c/156, c/376.  */
2
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3
/* { dg-do compile } */
4
/* { dg-options "-Wformat" } */
5
 
6
#include "format.h"
7
 
8
size_t
9
foo (void)
10
{
11
  size_t t;
12
  scanf ("%zu", &t); /* { dg-bogus "length|format" "bogus scanf warning" } */
13
  return t;
14
}
15
 
16
void
17
bar (size_t t)
18
{
19
  printf ("%zu\n", t); /* { dg-bogus "format" "bogus printf warning" } */
20
}
21
 
22
/* The %Z printf format is an old GNU libc extension to do the same thing.  */
23
 
24
void
25
baz (size_t t)
26
{
27
  printf ("%Zu\n", t); /* { dg-bogus "format" "bogus printf warning" } */
28
}

powered by: WebSVN 2.1.0

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