On Sat, Jul 05, 2025 at 09:35:58PM +0200, Kornel Benko wrote:
> Am Sat, 5 Jul 2025 21:18:52 +0200
> schrieb Kornel Benko <[email protected]>:
> 
> > Am Sat, 5 Jul 2025 20:59:42 +0200
> > schrieb Scott Kostyshak <[email protected]>:
> > 
> > > On Sat, Jul 05, 2025 at 08:14:49PM +0200, Kornel Benko wrote:  
> > > > Am Sat, 05 Jul 2025 18:05:27 +0000
> > > > schrieb Scott Kostyshak <[email protected]>:
> > > >     
> > > > > commit cd5fb84098f46738a45699aeb1491b52282e3c2d
> > > > > Author: Scott Kostyshak <[email protected]>
> > > > > Date:   Sat Jul 5 20:04:28 2025 +0200
> > > > > 
> > > > >     Fix the last remaining -Wmissing-noreturn
> > > > >     
> > > > >     lyxbreaker() calls LBUFERR() which calls doBufErr() which was 
> > > > > previously
> > > > >     marked as [[noreturn] at 37b9655f.
> > > > > ---
> > > > >  src/CoordCache.h | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/src/CoordCache.h b/src/CoordCache.h
> > > > > index 8893aebe48..c732e6f042 100644
> > > > > --- a/src/CoordCache.h
> > > > > +++ b/src/CoordCache.h
> > > > > @@ -38,7 +38,7 @@ class MathData;
> > > > >  #define ASSERT_HAS_POS(thing, hint)
> > > > >  #endif
> > > > >  
> > > > > -void lyxbreaker(void const * data, const char * hint, int size);
> > > > > +[[noreturn]] void lyxbreaker(void const * data, const char * hint, 
> > > > > int size);
> > > > >  
> > > > >  struct Geometry {
> > > > >       Point pos = {-10000, -10000 };    
> > > > 
> > > > /usr2/src/lyx/lyx-git/src/LyX.cpp:270:1: error: function declared 
> > > > 'noreturn' should
> > > > not return [-Werror,-Winvalid-noreturn] 270 | }    
> > > 
> > > Dang. What is your compiler and compiler version number?
> > > 
> > > I tested on GCC 13.3.0 and Clang 18.1.3.
> > > 
> > > I have access to other versions so I'll test those when I can.
> > > 
> > > Scott  
> > 
> > clang18.1.3
> > -fno-strict-aliasing  -O3 -DNDEBUG -std=c++20 -Wall -Wextra 
> > -Wno-deprecated-copy -Werror
> > -pedantic -Wundef -Wno-nested-anon-types -Wno-deprecated-declarations 
> > 
> >     Kornel
> 
> This 'cures' it
> diff --git a/src/LyX.cpp b/src/LyX.cpp
> index 8c467f5e6a..c847de0d3e 100644
> --- a/src/LyX.cpp
> +++ b/src/LyX.cpp
> @@ -263,12 +263,11 @@ void lyx_exit(int exit_code)
>  #endif
>  
>         // In release mode, try to exit gracefully.
>         if (theApp())
>                 theApp()->exit(exit_code);
> -       else
> -               exit(exit_code);
> +       exit(exit_code);

Interesting! Thanks for figuring that out. It makes sense from a cursor
point of view, but I also am hesitant to touch this code.

I suggest we wait to see if anyone else gives a +1 to your patch.
Otherwise I will revert my change to that function and put this warning
category on hold.

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to