Commit 42ded877 by Andreas Jaeger

New tests for noreturn.

From-SVN: r38611
parent 5c25e11d
/* Check for no "noreturn" warning in main. */
/* { dg-do compile } */
/* { dg-options "-O2 -Wmissing-noreturn -fhosted" } */
extern void exit (int) __attribute__ ((__noreturn__));
int
main (void)
{
exit (0);
}
/* Check for "noreturn" warning in main. */
/* { dg-do compile } */
/* { dg-options "-O2 -Wmissing-noreturn -ffreestanding" } */
extern void exit (int) __attribute__ ((__noreturn__));
int
main (void)
{
exit (0);
} /* { dg-warning "warning: function might be possible candidate for attribute `noreturn'" "warn for main" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment