From 17dc66773e416a66981392c9d6ff52873276fa52 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 11 Aug 2023 02:06:36 +0300 Subject: [PATCH] Disable -Wdanging-reference on warning levels 2 and 3 --- plugins/gnu/gnucompiler.cpp | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 2.45.2