This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: How to determine if a decl is a class member in GCC


Le-Chun Wu wrote:
Benjamin,

Thanks for looking into this issue. I see what's going on here. It's
basically a phase ordering problem. I am trying to determine whether a
declaration is a class member when attributes are parsed and handled
(in c-common.c), which happens earlier than where the context of a
data member is set (which takes place either in
finish_static_data_member_decl or finish_member_declaration). Do you
know of any way to determine whether a decl is a class member when we
are parsing the decl attributes?

I don't know for certain, but you could certainly try current_class_type, which is derived from the scope chain.


--BDS



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