With gcc/g++ I would also suggest that you specifically state the version of the standard you want to use, ie "-std=c++20" because by default gcc/g++ uses "-std=gnu++XX". I recommend sticking with one of the standards instead of the gnu hacks unless you actually need them.

One other warning I normally use is "-Wvla", especially in C++ since IMO vla are a horrible addition to the C standard and are disallowed in C++.