CVSROOT: /cvs Module name: src Changes by: m...@cvs.openbsd.org 2023/02/01 13:34:10
Modified files: gnu/usr.bin/gcc/gcc: c-typeck.c Log message: Backport gnu/gcc/gcc/c-typeck.c r1.3 to the gcc 3 code base: Adjust how gcc3 handles the "missing braces around initializer" warning. In c99 any value can be initalised using a { 0 } constructor independent of the type. Now if a struct's first member is another struct then gcc4 issues the above warning but it should not do that. Move the warning check from push_init_level() to pop_init_level() and check if either { 0 } or { } was used. If additional implicit braces were added surpress the warning. Inspired by gcc PR#64709 light testing by me, serious testing by aoyama@