Mercurial > hg > CbC > CbC_llvm
diff clang/test/Sema/indirect-goto.c @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | c4bab56944e8 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clang/test/Sema/indirect-goto.c Thu Feb 13 15:10:13 2020 +0900 @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +struct c {int x;}; +int a(struct c x, long long y) { + void const* l1_ptr = &&l1; + goto *l1_ptr; +l1: + goto *x; // expected-error{{incompatible type}} + goto *y; // expected-warning{{incompatible integer to pointer conversion}} +} +