On 3 February 2018 at 18:30, Martin Sebor <msebor@xxxxxxxxx> wrote: > On 01/31/2018 02:41 AM, Jay Foad wrote: > >> See example below: I'm getting warnings emitted by the -flto link stage. >> I'd like to selectively disable these warnings in my build scripts, but >> the >> usual -Wno-* option doesn't seem to have any effect. Is it supposed to >> work? Is there another way to do it? >> > > It is supposed to work but it doesn't appear to. I don't see > the warning with your test case where the memset is eliminated > but I can reproduce it when the array is used. There are at > least a couple of bugs in Bugzilla for the interaction between > some warning options and LTO (e.g., 71907 and 79062) but I don't > know of one that points out that the suppression doesn't work. > Please go ahead and open one if you have an account, or otherwise > let me know and I'll open one for you. > Thanks. I've opened: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84212 Jay.