是否有为 GCC 开发的 `clang++:-Wunused-lambda-capture` 等效警告 in/being?

Is there a `clang++:-Wunused-lambda-capture` equivalent warning in/being developed for GCC?

背景

我有时 运行 进入使用以下虚拟 lambda 捕获的代码(而不是 C++17 中的 (void)x;... foo(int /* x */)... foo([[maybe_unused]] int x))为了补救未使用的变量警告:

void foo(int x)
{
    [&x]{}();
}

现在,这并不是真正的补救措施,因为它将警告从当前范围传递到 lambda 捕获,但是 afaik,GCC 没有诊断来标记这一点,而例如如果激活,Clang (as of 5.0) 会发出 unused-lambda-capture 警告。

$ clang++ -xc++ -std=c++11 -Wunused-lambda-capture - <<< "int main() { int x; [&x]{}(); }"

<stdin>:1:23: warning: lambda capture 'x' is not used [-Wunused-lambda-capture]
int main() { int x; [&x]{}(); }
                      ^
1 warning generated.

在 GCC 项目中,如果可能的话,我会在不求助于 Clang 的情况下捕获上述构造。

问题

这是 GCC 的公开错误报告

Is there indeed currently no equivalent for GCC?

确实如此,正如非常古老但仍未解决的错误报告所涵盖的那样:

If not, is that a feature that is currently planned to be implemented / currently being implemented?

基于此错误报告缺乏行动(在 2012 年报告并确认,此后似乎没有发生太多事情),这不太可能很快添加。