URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
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 "-fshow-column" } */
|
3 |
|
|
/* test redeclarations with void and implicit int */
|
4 |
|
|
extern foo1(); /* { dg-message "8:note: previous declaration" } */
|
5 |
|
|
extern void foo1(); /* { dg-error "13:conflicting types" } */
|
6 |
|
|
|
7 |
|
|
extern void foo2(); /* { dg-message "13:note: previous declaration" } */
|
8 |
|
|
extern foo2(); /* { dg-error "8:conflicting types" } */
|
9 |
|
|
|
10 |
|
|
void foo3() {} /* { dg-message "6:note: previous definition" } */
|
11 |
|
|
extern foo3(); /* { dg-error "8:conflicting types" } */
|
12 |
|
|
|
13 |
|
|
extern foo4(); /* { dg-message "8:note: previous declaration" } */
|
14 |
|
|
void foo4() {} /* { dg-error "6:conflicting types" } */
|
15 |
|
|
|
16 |
|
|
extern void foo5(); /* { dg-message "13:note: previous declaration" } */
|
17 |
|
|
foo5() {} /* { dg-warning "1:conflicting types" } */
|
18 |
|
|
|
19 |
|
|
foo6() {} /* { dg-message "1:note: previous definition" } */
|
20 |
|
|
extern void foo6(); /* { dg-error "13:conflicting types" } */
|
21 |
|
|
|
22 |
|
|
foo7() {} /* { dg-message "1:note: previous definition" } */
|
23 |
|
|
void foo7() {} /* { dg-error "6:conflicting types" } */
|
24 |
|
|
|
25 |
|
|
void foo8() {} /* { dg-message "6:note: previous definition" } */
|
26 |
|
|
foo8() {} /* { dg-error "1:conflicting types" } */
|
27 |
|
|
|
28 |
|
|
int use9() { foo9(); } /* { dg-message "note: previous implicit declaration" } */
|
29 |
|
|
extern void foo9(); /* { dg-warning "13:conflicting types" } */
|
30 |
|
|
|
31 |
|
|
int use10() { foo10(); } /* { dg-message "note: previous implicit declaration" } */
|
32 |
|
|
void foo10() {} /* { dg-warning "6:conflicting types" } */
|
33 |
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.