I’ve tried building JUCE with g++ 11.0.1 20210416 (experimental) and -Wfree-nonheap-object but I can’t reproduce the warning. Perhaps it has been fixed in the compiler.
Thanks that’s good to know. The GCC11 version I had in Fedora 34 beta seems from March. But I do see a version 11.0.1 that will become available as an update when Fedora 34 is released. So let’s hope you are right and that this issue has been fixed in 11.0.1.
I think we’ll fix this by changing the underlying empty string check to use the address of a constexpr static instead, but this will need a bit more testing.