>>> - if (s->u.s.line.file != NULL >>> - || (s->u.s.lang_struct && (s->u.s.lang_struct->u.s.bitmap & >>> bitmap))) >>> + if (s->u.s.lang_struct && (s->u.s.lang_struct->u.s.bitmap & bitmap)) >>> { >>> error_at_line (pos, "duplicate definition of '%s %s'", >>> isunion ? "union" : "struct", s->u.s.tag); >> >> >> ..and this are missing from the ChangeLog. Also, what is the >> motivation behind the latter? > > > I explained it in the original submission: > > > "There is one check I needed to remove that gave me some trouble. > When a ctor is detected, we have already parsed the name of the > ctor as a type, which is then registered in the list of structures. > > We go on to recognize it as a ctor *after* the type has been > registered. We reject the field in declarator() and it is never > added to the list of fields for the class. > > However, when we reach the end of the class, we find that the > type we created while parsing the ctor has line number > information in it (the line where the ctor was) and gengtype > thinks that it is a duplicate structure definition. > > I took out this check for two reasons: (a) It is actually > unnecessary because if there were really duplicate definitions of > this structure, the code would not compile, and (b) all the other > alternatives required making the parser much more convoluted and > I'm trying hard not to make gengtype parser too smart." > > I should've clarified that I was talking about that hunk, sorry. I will add > a ChangeLog entry for it.
Doh, yes, of course. It's OK with ChangeLog entry added. Thanks, -- Laurynas