https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107019
Mario Klebsch <mario at klebsch dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mario at klebsch dot de --- Comment #1 from Mario Klebsch <mario at klebsch dot de> --- Created attachment 53619 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53619&action=edit Sample demonstrating the bug Needs boost-1.80.0 compile with g++ -Wall -c -I boost_1_80_0 bug2.cpp > ~/tmp $ g++ -Wall -c -I boost_1_80_0 bug2.cpp > bug2.cpp: In function ‘int main(int, char**)’: > bug2.cpp:17:28: warning: variable ‘func’ set but not used > [-Wunused-but-set-variable] > 17 | static const char *func = __FUNCTION__; > | ^~~~ > ~/tmp $