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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [redecl-4.c] - Blame information for rev 716

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

Line No. Rev Author Line
1 689 jeremybenn
/* Test for multiple declarations and composite types, with built-in
2
   functions.  */
3
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4
/* { dg-do compile } */
5
/* { dg-options "-std=c89 -Wformat -g" } */
6
 
7
void
8
f (void)
9
{
10
  int printf;
11
  int strcmp;
12
  {
13
    int printf (const char *, ...);
14
    int strcmp ();
15
    /* Should get format warnings even though the built-in declaration
16
       isn't "visible".  */
17
    printf ("%s", 1); /* { dg-warning "format" } */
18
    /* The type of strcmp here should have no prototype.  */
19
    if (0)
20
      strcmp (1);
21
    /* Likewise, implicitly declared memcmp.  */
22
    if (0)
23
      memcmp (1);
24
  }
25
}
26
 
27
/* Should still diagnose incompatible prototype for strcmp.  */
28
int strcmp (void); /* { dg-error "conflict" } */

powered by: WebSVN 2.1.0

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