Re: DECL_NAME() yields ._69 for anonymous union parsed with g++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 09, 2012 at 12:28:03AM -0500, Peter Colberg wrote:
> How can one differentiate between a named and an unnamed union, if
> the TYPE_DECL node has an (user- or compiler-generated) identifier
> in both cases?

Ok, I got it. The name format is defined as ANON_AGGRNAME_FORMAT.
The function responsible for naming anonymous structs/unions is
make_anon_name().

Use TYPE_ANONYMOUS_P() to check for anonymous structs/unions:

#include "cp/cp-tree.h"

RECORD_OR_UNION_CODE_P(TREE_CODE(node)) && TYPE_ANONYMOUS_P(node))


I hope my monologues on the GCC lists are useful to someone ;-).

Peter


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux