On Mon, Oct 15, 2018 at 07:11:16AM +0200, Kornel Benko wrote: > Am Sonntag, 14. Oktober 2018 16:58:51 CEST schrieb Scott Kostyshak > <skost...@lyx.org>: > > On Sun, Oct 14, 2018 at 08:48:33PM +0200, Kornel Benko wrote: > > > Am Sonntag, 14. Oktober 2018 10:59:08 CEST schrieb Scott Kostyshak > > > <skost...@lyx.org>: > > > > On Sun, Oct 14, 2018 at 08:11:19AM +0200, Kornel Benko wrote: > > > > > > > > > I agree. OTOH, I need it while debugging. Do you know how to trick > > > > > the compiler? > > > > > For now, I will remove the routine > > > > > > > > Maybe this? > > > > > > > > https://stackoverflow.com/a/3394268/1376404 > > > > > > > > Scott > > > > > > Yes, some pragma would be OK. > > > > > > If I understood correctly > > > > > > #pragma GCC diagnostic push > > > #pragma GCC diagnostic ignored "-Werror" > > > > > > some unused code > > > > > > #pragma GCC diagnostic pop > > > > > > could do it. > > > > Thanks for fixing it (I just compiled current master without error). I > > know it's not fun to spend time fixing something that is not really > > broken, but I'm happy to have -Werror back. > > > > I can test a patch (compiling with -Werror) if you want to put the > > function back as it was and with the pragma. > > > > Scott > > > > Nothing seems to work with g++ 5.4.0, which I am using. > > But I tried also the version 7.1, and there the following works > #pragma GCC diagnostic push > #pragma GCC diagnostic ignored "-Wpragmas" > #pragma GCC diagnostic ignored "-Wunused-function" > ... > #pragma GCC diagnostic pop > > So for '-Werror' we would need to use a recent enough compiler :(
Ah indeed I doubt we want to require a recent compiler just for this. I'm surprised the feature is so new. Well, hopefully in a few years we will be able to use this. We would also have to think about Clang, but I'm guessing they have a mechanism to deal with such things also. Scott
signature.asc
Description: PGP signature