$ g++ -isystem sys x.cpp -c -Wall -O
sys/x.hpp: In function 'int main()':
sys/x.hpp:7: warning: 'i' is used uninitialized in this function
sys/x.hpp:6: note: 'i' was declared here
i ran into this during playing with new boost libraries.
Created attachment 13714 [details]
At variance with c++/32256, this one apparently happens as "C" code too... Probably should be not categorized as C++-only...
(In reply to comment #2)
> At variance with c++/32256, this one apparently happens as "C" code too...
> Probably should be not categorized as C++-only...
these little bugs (PR32368, PR32256) are treated as blockers
by people having `-Wall -Werror` in theirs projects.
could we fix this issue easily and quickly in 4.x?
Testing a patch.
Subject: Bug 32368
Date: Tue Nov 6 15:57:02 2007
New Revision: 129936
PR c++/32256, PR c++/32368:
* function.c (saved_in_system_header): New global.
(push_cfun): Save in_system_header.
(pop_cfun): Restore in_system_header.
(push_struct_function): Save in_system_header.
* g++.dg/warn/pragma-system_header3.h: New.
* g++.dg/warn/pragma-system_header3.C: New.
* g++.dg/warn/pragma-system_header4.C: New.
* g++.dg/warn/pragma-system_header4.h: New.
Fixed on trunk.
We have one regression open for this. Let's close this as fixed.