summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/noreturn-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/noreturn-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/noreturn-1.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/testsuite/gcc.dg/noreturn-1.c b/gcc/testsuite/gcc.dg/noreturn-1.c
index 3bf62c15b40..90660fa028c 100644
--- a/gcc/testsuite/gcc.dg/noreturn-1.c
+++ b/gcc/testsuite/gcc.dg/noreturn-1.c
@@ -7,8 +7,8 @@ extern void exit (int);
extern void foo1(void) __attribute__ ((__noreturn__));
void
foo1(void)
-{ /* { dg-warning "`noreturn' function does return" "detect falling off end of noreturn" } */
-}
+{
+} /* { dg-warning "`noreturn' function does return" "detect falling off end of noreturn" } */
extern void foo2(void) __attribute__ ((__noreturn__));
void
@@ -26,16 +26,17 @@ foo3(void)
extern void foo4(void);
void
foo4(void)
-{
+{ /* { dg-warning "candidate for attribute `noreturn'" "detect noreturn candidate" } */
exit(0);
-} /* { dg-warning "candidate for attribute `noreturn'" "detect noreturn candidate" } */
+}
extern void foo5(void) __attribute__ ((__noreturn__));
void
foo5(void)
{
return; /* { dg-warning "`noreturn' has a `return' statement" "detect invalid return" } */
-} /* { dg-warning "`noreturn' function does return" "detect return from noreturn" } */
+}
+/* { dg-warning "function does return" "detect return from noreturn" { target *-*-* } 37 } */
extern void foo6(void);
void