saner reporting of overlaps in initializers
PATCH 1/1 saner reporting of overlaps in initializers
Fix the check for overlapping initializers; the current code tries to skip ones with zero ->bit_size, but doesn't get it right.
Signed-off-by Al Viro <[email protected]>
--- expand.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
expand.c +3 -1
@@ -874,7 +874,9 @@ static void verify_nonoverlapping(struct expression_list **list)struct expression *b; FOR_EACH_PTR(*list, b) { -if (a && a->ctype && a->ctype->bit_size &&bit_offset (a) ==bit_offset (b)) { +if (!b->ctype || !b->ctype->bit_size) +continue ; +if (a &&bit_offset (a) ==bit_offset (b)) {sparse_error (a->pos,"Initializer entry defined twice" );info (b->pos," also defined here" );return ;
Signature · 1 line
1.5.0-rc2.GIT