$ cat structs.C struct foo { int j; unsigned i; }; foo f = { -1, -1 };
int main() { } $ g++-4.1.1 -o structs structs.C -Wall -W $ g++-3.4.6 -o structs structs.C -Wall -W structs.C:6: warning: converting of negative value `-0x000000001' to `unsigned int' $ -- Summary: signed to unsigned in struct initializer should generate a warning Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jaco at kroon dot co dot za GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29287