RFC: Enabling -Wshadow, by default?

Christoph GrĂ¼ninger foss at grueninger.de
Mon Jan 5 18:29:17 GMT 2026


Hi Friedrich,
I often resolve compiler warnings and findings from static analyzers. 
Last year I spotted a real bug where shadowing mislead the original 
author to use the wrong variable. I could not find the according pull 
request, I think it was outside of KDE.

Personally, I consider shadowing a defect and I would not accept it in a 
review.

Bye
Christoph

-- 
Most customers will not accept source code with compile errors in it.
                  Dan Saks, CppCon 2016 (https://youtu.be/D7Sd8A6_fYU)



More information about the kde-devel mailing list