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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [redecl-4.c] - Rev 867

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

/* Test for multiple declarations and composite types, with built-in
   functions.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "-std=c89 -Wformat -g" } */
 
void
f (void)
{
  int printf;
  int strcmp;
  {
    int printf (const char *, ...);
    int strcmp ();
    /* Should get format warnings even though the built-in declaration
       isn't "visible".  */
    printf ("%s", 1); /* { dg-warning "format" } */
    /* The type of strcmp here should have no prototype.  */
    if (0)
      strcmp (1);
    /* Likewise, implicitly declared memcmp.  */
    if (0)
      memcmp (1);
  }
}
 
/* Should still diagnose incompatible prototype for strcmp.  */
int strcmp (void); /* { dg-error "conflict" } */
 

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

powered by: WebSVN 2.1.0

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