I wanted to check whether a g++ compiler-flag exists that warns me about nullpointer-dereferencing. When compiling this code with
Код: Выделить всё
g++ (GCC) 13.1.1
Код: Выделить всё
#include int main() { double *elem = new (std::nothrow) double; elem = nullptr; std::cout
Источник: [url]https://stackoverflow.com/questions/76359001/does-even-a-single-g-flag-warn-about-nullpointer-dereferencing[/url]