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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [c90-static-1.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* It is a constraint violation for a static function to be declared
2
   but not defined if it is used except in a sizeof expression.  The
3
   use of the function simply being unevaluated is not enough.  */
4
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5
/* { dg-do compile } */
6
/* { dg-options "-O2 -std=iso9899:1990 -pedantic-errors" } */
7
 
8
/* Constraint violation (trivial case, where function is used).  */
9
static void f0(void); /* { dg-error "used but never defined" } */
10
void g0(void) { f0(); }
11
 
12
/* Constraint violation.  */
13
static void f1(void); /* { dg-error "used but never defined" } */
14
void g1(void) { if (0) { f1(); } }
15
 
16
/* Constraint violation.  */
17
static int f2(void); /* { dg-error "used but never defined" } */
18
void g2(void) { 0 ? f2() : 0; }
19
 
20
/* OK.  */
21
static int f3(void);
22
void g3(void) { sizeof(f3()); }

powered by: WebSVN 2.1.0

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