I encounter the warning “will never be NULL [-Waddress]” on Ubuntu 20.04.1 with GCC 9.3.0:
.../JUCE/modules/juce_gui_basics/native/juce_linux_Windowing.cpp:782:72: required from here
.../JUCE/modules/juce_core/misc/juce_Functional.h:57:16: warning: the address of ‘static constexpr void juce::showDialog(const juce::MessageBoxOptions&, juce::ModalComponentManager::Callback*, juce::Async)::<lambda(int)>::_FUN(int)’ will never be NULL [-Waddress]
57 | if (fn != nullptr)
| ~~~^~~~~~~~~~
I’m not able to reproduce the issue with GCC 9.4 on Ubuntu 21.10. Are you using Projucer or CMake? Are you adding any custom compilation options when configuring your project?
I tried directly with a JUCE example (GuiAppExample) - you can also use CMAKE_CXX_STANDARD 20.
Using an older C++ standard fix the issue. I tried on Ubuntu 21.10 and it also happens with GCC 9.4 but not with more recent versions. Do you think it’s a bug of this GCC version with C++20?