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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [builtins-30.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
/* { dg-do compile } */
2
/* { dg-options "-Wall -Wshadow -fshow-column" } */
3
 
4
extern double strtod (const char *, char **);
5
#define UNUSED __attribute__ ((unused))
6
 
7
/* A built-in function may be overridden by an old-style definition
8
   specifying too few arguments... */
9
double cos ()  /* { dg-warning "shadows a built-in|number of arguments" } */
10
{
11
  return strtod ("nan", 0);
12
}
13
 
14
/* the right number, but the wrong type, arguments... */
15
double sin (foo)  /* { dg-warning "8:shadows a built-in" } */
16
     int foo UNUSED; /* { dg-warning "10:argument 'foo' doesn't match built-in prototype" } */
17
{
18
  return strtod ("nan", 0);
19
}
20
 
21
/* or too many arguments.  */
22
long double cosl (foo, bar)  /* { dg-warning "shadows a built-in|number of arguments" } */
23
     const char *foo UNUSED; /* { dg-warning "18:argument 'foo' doesn't match" } */
24
     int bar UNUSED;
25
{
26
  return strtod ("nan", 0);
27
}

powered by: WebSVN 2.1.0

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