On Thu, Oct 13, 2022 at 07:03:24PM +0200, Arsen Arsenović wrote: > @@ -1,10 +1,10 @@ > /* Check for "noreturn" warning in main. */ > /* { dg-do compile } */ > -/* { dg-options "-O2 -Wmissing-noreturn -ffreestanding" } */ > +/* { dg-options "-O2 -Wmissing-noreturn" } */ > extern void exit (int) __attribute__ ((__noreturn__)); > > -int > -main (void) /* { dg-warning "function might be candidate for attribute > 'noreturn'" "warn for main" } */ > +void > +f (void) /* { dg-warning "function might be candidate for attribute > 'noreturn'" "warn for main" } */ > { > exit (0); > }
Don't we have such a test already elsewhere? If not, then certain "warn for main" part should be removed or replaced... Jakub