Re: GCC/Clang attributes guiding warnings about unused entities

2023-04-28 Thread Stephan Bergmann via Gcc
On 4/28/23 11:55, Florian Weimer wrote: * Stephan Bergmann via Gcc: [cross-posting this to both the GCC and Clang communities] I don't see your post here: <https://discourse.llvm.org/search?expanded=true&q=unused%20after%3A2023-04-20> I don't think this is exp

GCC/Clang attributes guiding warnings about unused entities

2023-04-26 Thread Stephan Bergmann via Gcc
[cross-posting this to both the GCC and Clang communities] I have two specific issues on the subject I would like to discuss below. But first a quick overview: C++ has two attributes dealing with warnings about unused entities: * In one direction (making the compiler suppress warnings it wou

Re: More aggressive GCC 12 -Wmaybe-uninitialized when using

2021-07-23 Thread Stephan Bergmann via Gcc
On 22/07/2021 12:03, Jonathan Wakely wrote: This should fix it: [...] Thanks; it indeed fixed the LibreOffice build for me.

More aggressive GCC 12 -Wmaybe-uninitialized when using

2021-07-22 Thread Stephan Bergmann via Gcc
Compared to GCC 11 (at least gcc-c++-11.1.1-3.fc34.x86_64), recent GCC 12 trunk emits two "unhelpful" -Wmaybe-uninitialized for $ cat test.cc #include using fn = std::function; fn f(fn x) { fn a; a = x; return x; } $ ~/gcc/trunk/inst/bin/g++ -c -Wmaybe-uninitialized -O2 test.cc