diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-21 03:09:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-21 03:09:59 +0000 |
commit | 21190d54634d6e244e85d28ad915ce2fe86ecbff (patch) | |
tree | 1b225fc93d762dbed904c2b8f879110c0ed626fa /test/Sema/builtins.c | |
parent | a674bf437ea0f85f2ffdab20df591a6c410c63ed (diff) |
Implement __builtin_unreachable(), a GCC 4.5 extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/builtins.c')
-rw-r--r-- | test/Sema/builtins.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c index 068f3006f4..c3daa667d8 100644 --- a/test/Sema/builtins.c +++ b/test/Sema/builtins.c @@ -41,3 +41,14 @@ void test9(short v) { old = __sync_fetch_and_add(&old); // expected-error {{too few arguments to function call}} old = __sync_fetch_and_add((int**)0, 42i); // expected-warning {{imaginary constants are an extension}} } + + +// rdar://7236819 +void test10(void) __attribute__((noreturn)); + +void test10(void) { + __asm__("int3"); + __builtin_unreachable(); + + // No warning about falling off the end of a noreturn function. +} |