gcc/testsuite/gcc.dg/typedef-var-2.c
raw| 1 | /* PR c/91815 */ |
| 2 | /* { dg-do compile } */ |
| 3 | |
| 4 | int f (void) |
| 5 | { |
| 6 | extern float v; |
| 7 | /* { dg-message "note: previous declaration" "previous declaration" { target *-*-* } .-1 } */ |
| 8 | return (v > 0.0f); |
| 9 | } |
| 10 | |
| 11 | extern int t; |
| 12 | /* { dg-message "note: previous declaration" "previous declaration" { target *-*-* } .-1 } */ |
| 13 | |
| 14 | typedef float t; /* { dg-error "redeclared as different kind of symbol" } */ |
| 15 | |
| 16 | t v = 4.5f; /* { dg-error "conflicting types" } */ |