Commit 42ded877 by Andreas Jaeger

New tests for noreturn.

From-SVN: r38611
parent 5c25e11d
2001-01-02 Andreas Jaeger <aj@suse.de>
* gcc.dg/noreturn-3.c: New test.
* gcc.dg/noreturn-4.c: New test.
2001-01-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c-torture/execute/stdio-opt-1.c: Also test
......
/* 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