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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [parm-incomplete-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Test warnings and errors for incomplete parameter types.  Should
2
   not be warned for in declarations that are not definitions: bug
3
   17881.  Void types may be a special case, especially for unnamed
4
   parameters and when qualified or with a storage class specifier;
5
   see C90 6.5.4.3, DR#017 Q14, C90 TC1, DR#157, C99 J.2 (referencing
6
   C99 6.7.5.3); the precise rules are unclear.  */
7
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
8
/* { dg-do compile } */
9
/* { dg-options "" } */
10
 
11
struct s;
12
void f (struct s);
13
void (*g)(struct s);
14
struct t { void (*p)(struct s); };
15
 
16
struct s { int b; };
17
void h (struct s x) { }
18
 
19
void j(struct t2); /* { dg-warning "'struct t2' declared inside parameter list" } */
20
/* { dg-warning "its scope is only" "explanation" { target *-*-* } 19 } */
21
 
22
union u;
23
 
24
void v(union u x) { } /* { dg-error "parameter 1 \\('x'\\) has incomplete type" } */
25
 
26
void p(void x); /* { dg-warning "parameter 1 \\('x'\\) has void type" } */
27
 
28
void q(const void x); /* { dg-warning "parameter 1 \\('x'\\) has void type" } */

powered by: WebSVN 2.1.0

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