On Thu, May 22, 2014 at 6:22 AM, John Keeping <john@xxxxxxxxxxxxx> wrote: > This is because in evaluate.c::convert_ident() the offset of a member of > the inner union is set to the offset within the union, not the overall > offset. > > Earlier, the correct offset has been calculated for check_designators() > by find_identifier() so by setting the offset there we end up using the > correct offset later on. Thanks for the investigation. That does look like what happened. > > Signed-off-by: John Keeping <john@xxxxxxxxxxxxx> > --- > I'm pretty sure this is the wrong fix and I suspect it breaks some other > scenarios like mixing designators and plain initializers, but I've run > out of time to investigate this further and hopefully the correct patch > will be obvious to someone who knows the code better... I will take a look to see if there is better way to pass the offset to the initializers. Thanks for the patch. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html