On Thu, Nov 23, 2023 at 07:22:58PM +0100, Florian Weimer wrote:
> * Marek Polacek:
> 
> > On Mon, Nov 20, 2023 at 10:56:30AM +0100, Florian Weimer wrote:
> >> gcc/
> >> 
> >>    * doc/invoke.texi (Warning Options): Document changes.
> >
> > That's pretty vague :).  How about "Document that -Wreturn-mismatch is a
> > permerror in C99."?
> 
> Applied (with “in C99 and later”).
> 
> >>    * gcc.target/powerpc/conditional-return.c: Compile with
> >>    -fpermissive due to expected    -Wreturn-mismatch error.
> >
> > There seem to be some extra whitespaces after "expected".
> 
> Fixed.
> 
> >> @@ -7375,7 +7376,10 @@ Attempting to use the return value of a 
> >> non-@code{void} function other
> >>  than @code{main} that flows off the end by reaching the closing curly
> >>  brace that terminates the function is undefined.
> >>  
> >> -This warning is specific to C and enabled by default.
> >> +This warning is specific to C and enabled by default.  In C99 and later
> >> +language dialects, it is treated as an error.  It an be downgraded
> >
> > an -> can
> 
> Fixed.
> 
> >> diff --git a/gcc/testsuite/gcc.target/powerpc/conditional-return.c 
> >> b/gcc/testsuite/gcc.target/powerpc/conditional-return.c
> >> index 6b3ef5f52ca..c6491216752 100644
> >> --- a/gcc/testsuite/gcc.target/powerpc/conditional-return.c
> >> +++ b/gcc/testsuite/gcc.target/powerpc/conditional-return.c
> >> @@ -1,7 +1,7 @@
> >>  /* Check that a conditional return is used.  */
> >>  
> >>  /* { dg-do compile } */
> >> -/* { dg-options "-O2 -w" } */
> >> +/* { dg-options "-O2 -fpermissive -w" } */
> >>  
> >>  /* { dg-final { scan-assembler {\mbeqlr\M} } } */
> >>  
> >
> > These seem fine.
> >
> > Should we have a test for -Wno-error=return-mismatch and 
> > -Wno-return-mismatch?
> > I didn't see those.
> 
> See gcc/testsuite/gcc.dg/permerror-noerror.c and
> gcc/testsuite/gcc.dg/permerror-nowarning.c.  They don't show up in the
> patch because the diagnostics don't change.

Ah, I see that now.  This patch is OK then.  Thanks.

Marek

Reply via email to