This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/DWARF] Set TYPE_FLAG_STUB for enum DIEs that are declarations only


> > +  if (die_is_declaration (die, cu))
> > +    TYPE_FLAGS (type) |= TYPE_FLAG_STUB;
> > +
> 
> I'd suggest a comment here to explain why we do this.

I am the kind that usually writes a lot of comments, but I think
it would be surperfluous in this case: TYPE_FLAG_STUB and a non-zero
DW_AT_declaration attribute are two ways of saying the same thing.
Are you sure you want a comment?

  /* If the type is a declaration, then the definition is not
     complete.  Mark the type as a stub.  */

This comment is just repeating the code.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]