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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [format/] [builtin-1.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 format extensions.  Test that the __builtin functions get their
2
   default attributes even with -ffreestanding.
3
*/
4
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
5
/* { dg-do compile } */
6
/* { dg-options "-std=gnu99 -Wformat -ffreestanding" } */
7
 
8
#include "format.h"
9
 
10
void
11
foo (int i)
12
{
13
  __builtin_fprintf (stdout, "%d", i);
14
  __builtin_fprintf (stdout, "%ld", i); /* { dg-warning "format" "__builtin_fprintf" } */
15
  __builtin_printf ("%d", i);
16
  __builtin_printf ("%ld", i); /* { dg-warning "format" "__builtin_printf" } */
17
 
18
  __builtin_fprintf_unlocked (stdout, "%d", i);
19
  __builtin_fprintf_unlocked (stdout, "%ld", i); /* { dg-warning "format" "__builtin_fprintf_unlocked" } */
20
  __builtin_printf_unlocked ("%d", i);
21
  __builtin_printf_unlocked ("%ld", i); /* { dg-warning "format" "__builtin_printf_unlocked" } */
22
}

powered by: WebSVN 2.1.0

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