fix checking of overlapping initializer
commit7788da8bcf48254e62f46e4060f6fcbc23ba6c0f
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 22 Feb 2017 15:30:05 +0000 (22 16:30 +0100)
committerChristopher Li <sparse@chrisli.org>
Fri, 3 Mar 2017 16:45:38 +0000 (4 00:45 +0800)
tree7900f07e92086a9e87b5f85283fe41610d80e506
parent6c66b45aa212ebdd02a5be7875e3e163139431a9
fix checking of overlapping initializer

The current routine checking if some initializers overlap with each
others only check the offset of the initialierd fields, not taking
in account that array elements can be initialized by range with the
'[a ... b]' notation.

Fix this by changing the check so that now we compare the offset of
the current field with the end of the previous one.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
expand.c
validation/field-override.c