freebsd-dev/test/Sema/indirect-goto.c

12 lines
276 B
C
Raw Normal View History

2010-01-01 10:34:51 +00:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
2009-06-02 17:58:47 +00:00
struct c {int x;};
int a(struct c x, long long y) {
2010-02-16 09:31:36 +00:00
void const* l1_ptr = &&l1;
goto *l1_ptr;
l1:
2009-06-02 17:58:47 +00:00
goto *x; // expected-error{{incompatible type}}
goto *y; // expected-warning{{incompatible integer to pointer conversion}}
}