https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82724

--- Comment #1 from Paul Robinson <paul_robinson at playstation dot sony.com> 
---
David and I have differing opinions on this one, but he was kind enough
to cc me on the bug so I'll offer up my take on it.

It's inarguable that omitting information makes the information smaller.
The question in my mind is whether omitting the information is proper DWARF.

Basically, I think omitting the template parameter children from a
forward declaration is just as wrong as omitting the formal parameter
children from a function declaration.  One might argue that template
parameter information could be inferred from the name used on a forward
declaration, which is true; but DWARF does not prescribe any particular
semantics for an entity's name, and inferring that information falls
outside the DWARF spec.  It is a private contract between a producer and
a consumer, which is fine, but it's a private contract.  That means it is
not something a given producer can assume all consumers will understand,
and is not something a given consumer can assume all producers will produce.
Providing the template parameter children is unambiguous in that respect.

Reply via email to