Re: How to determine if a decl is a class member in GCC

2008-07-22 Thread Benjamin Smedberg
Le-Chun Wu wrote: Hi, I haven't heard anything back on my questions. Can any of C++ frontend maintainers please shed some light (or comment on my proposed patch)? Thanks a lot. Le-chun On Fri, Jul 18, 2008 at 10:22 AM, Le-Chun Wu [EMAIL PROTECTED] wrote: Hi, In my attribute handlers that

Re: How to determine if a decl is a class member in GCC

2008-07-22 Thread Le-Chun Wu
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

Re: How to determine if a decl is a class member in GCC

2008-07-22 Thread Benjamin Smedberg
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

Re: How to determine if a decl is a class member in GCC

2008-07-21 Thread Le-Chun Wu
Hi, I haven't heard anything back on my questions. Can any of C++ frontend maintainers please shed some light (or comment on my proposed patch)? Thanks a lot. Le-chun On Fri, Jul 18, 2008 at 10:22 AM, Le-Chun Wu [EMAIL PROTECTED] wrote: Hi, In my attribute handlers that handle the new

How to determine if a decl is a class member in GCC

2008-07-18 Thread Le-Chun Wu
Hi, In my attribute handlers that handle the new thread-safety attributes (in c-common.c), I need to check if a decl is a class member. How do people do that? My original code was checking if a decl is a FIELD_DECL but that doesn't work for static members. I also tried to use DECL_CONTEXT but it