http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52718
--- Comment #13 from Matthew Woehlke <mw_triad at users dot sourceforge.net> 2012-11-01 17:56:49 UTC --- ...and with your example I do indeed get no warning. Simplified test case: $ cat zero-as-pointer.h #pragma GCC system_header class Foo { public: Foo(void** = 0); }; class Bar { public: Bar(Foo = 0); }; $ cat zero-as-pointer.cpp #include "zero-as-pointer.h" int main() { Bar bar; return 0; } $ g++ -std=c++11 -Werror=zero-as-null-pointer-constant zero-as-pointer.cpp zero-as-pointer.cpp: In function ‘int main()’: zero-as-pointer.cpp:5:7: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] cc1plus: some warnings being treated as errors Apparently it is something about the 'Foo = 0' part (replace Foo with Qt::WindowFlags in my 'real' example).