annotate clang/test/Sema/indirect-goto.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 struct c {int x;};
anatofuz
parents:
diff changeset
4 int a(struct c x, long long y) {
anatofuz
parents:
diff changeset
5 void const* l1_ptr = &&l1;
anatofuz
parents:
diff changeset
6 goto *l1_ptr;
anatofuz
parents:
diff changeset
7 l1:
anatofuz
parents:
diff changeset
8 goto *x; // expected-error{{incompatible type}}
anatofuz
parents:
diff changeset
9 goto *y; // expected-warning{{incompatible integer to pointer conversion}}
anatofuz
parents:
diff changeset
10 }
anatofuz
parents:
diff changeset
11