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

Joel Brobecker brobecker@adacore.com
Sat Jan 5 15:05:00 GMT 2008


> > +  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



More information about the Gdb-patches mailing list