From: Mikko Rasa Date: Thu, 10 Aug 2023 23:06:36 +0000 (+0300) Subject: Disable -Wdanging-reference on warning levels 2 and 3 X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=17dc66773e416a66981392c9d6ff52873276fa52;p=builder.git Disable -Wdanging-reference on warning levels 2 and 3 --- diff --git a/plugins/gnu/gnucompiler.cpp b/plugins/gnu/gnucompiler.cpp index e4c050f..252f394 100644 --- a/plugins/gnu/gnucompiler.cpp +++ b/plugins/gnu/gnucompiler.cpp @@ -241,6 +241,8 @@ ExternalTask::Arguments GnuCompiler::_run(const ObjectFile &object, FS::Path &wo unsigned version = tool.get_extra_data(); if(version>=0x80000) argv.push_back("-Wno-cast-function-type"); + if(version>=0xD0000 && binfo.warning_level<4) + argv.push_back("-Wno-dangling-reference"); // Generates some annoying false positives } if(binfo.warning_level>=3) {