This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix PR 30666 [4.3 Regression]
Hi,
On Thu, 29 Mar 2007, Doug Gregor wrote:
> build_complex_type was placing IDENTIFIER_NODEs into TYPE_NAME, rather
> than TYPE_DECLs as it should have.
That actually is okay. The practice of using TYPE_DECLs in TYPE_NAME even
for non-typedefs is only done in the c++ frontend (at least in the past
that was so, perhaps that has meanwhile also crept into the other
frontends or general code). Normally all common code (including
dwarf2*) deals with TYPE_NAME either being an identifier or a decl.
Now, I don't know if we should phase out the use of IDENTIFIER_NODE (then
some code can be cleaned up), but it costs more memory than necessary
to build the superfluous tree node. But I do know that if the common type
machinery doesn't currently deal with IDENTIFIER_NODEs as TYPE_NAMEs that
much other code needs changes too, to not produce them.
Ciao,
Michael.