Issue
In my makefile I specify -Werror=uninitialized, but no errors occur.
I changed it to -Wuninitialized, and I see my warning. -Wno-uninitialized makes it go away as expected, but why isn’t -Werror=uninitialized working?
Also it was suggested in code I write
#pragma GCC diagnostic error "-Wuninitialized"
But that does not work either. Why?
I have another question, but unfortunately none of the suggestions are working for me.
Solution
You should use -Werror. This option doesn't have any parameters (it is an on/off switch).
But it is good practice to remove all warnings, so -Werror enforces this good practice.
Answered By - Peter Miehle Answer Checked By - Mary Flores (WPSolving Volunteer)