diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-03-26 07:32:37 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-03-26 07:32:37 +0000 |
commit | 6568eef9f90d7c843676f47ee2938a8af2600bf3 (patch) | |
tree | cd98ba9f72cc6561fba9c5d9631234b5930eae57 /clang/test/Sema/indirect-goto.c | |
parent | 55a2cd736d91e024ea5718f80edadff8c24434b7 (diff) | |
download | bcm5719-llvm-6568eef9f90d7c843676f47ee2938a8af2600bf3.tar.gz bcm5719-llvm-6568eef9f90d7c843676f47ee2938a8af2600bf3.zip |
Sanity-check argument to indirect goto.
llvm-svn: 67746
Diffstat (limited to 'clang/test/Sema/indirect-goto.c')
-rw-r--r-- | clang/test/Sema/indirect-goto.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/indirect-goto.c b/clang/test/Sema/indirect-goto.c new file mode 100644 index 00000000000..35fb5e6315e --- /dev/null +++ b/clang/test/Sema/indirect-goto.c @@ -0,0 +1,8 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +struct c {int x;}; +int a(struct c x, long long y) { + goto *x; // expected-error{{incompatible type}} + goto *y; // expected-warning{{incompatible integer to pointer conversion}} +} + |