How to determine if a decl is a class member in GCC
Benjamin Smedberg
bsmedberg@mozilla.com
Tue Jul 22 23:57:00 GMT 2008
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
More information about the Gcc
mailing list