OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [c90-impl-decl-1.c] - Diff between revs 298 and 384

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 384
/* Test for implicit function declaration: in C90 only.  */
/* Test for implicit function declaration: in C90 only.  */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
 
 
void
void
foo (void)
foo (void)
{
{
  bar ();
  bar ();
}
}
 
 
/* C90 subclause 7.1.7 says we can implicitly declare strcmp; C99 removes
/* C90 subclause 7.1.7 says we can implicitly declare strcmp; C99 removes
   implict declarations.
   implict declarations.
*/
*/
int
int
bar (const char *a, const char *b)
bar (const char *a, const char *b)
{
{
  /* This fails for GCC CVS 20000709, but is not marked XFAIL since
  /* This fails for GCC CVS 20000709, but is not marked XFAIL since
     GCC 2.95.2 passes.
     GCC 2.95.2 passes.
  */
  */
  return strcmp (a, b); /* { dg-bogus "implicit" "implicit declaration warning for strcmp" } */
  return strcmp (a, b); /* { dg-bogus "implicit" "implicit declaration warning for strcmp" } */
}
}
 
 

powered by: WebSVN 2.1.0

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