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 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 is not set (in the C++ front-end) for data
members. (I was able to use DECL_CONTEXT for member functions,
though.) Is there any other way that I should use?

I created a simple testcase for treehydra and it seems that DECL_CONTEXT was set and correct for all of the following in 4.3.0:

struct A {
  int a;
  int f();
  static int sa;
  static int sf();
};

Are you saying that you don't see a proper DECL_CONTEXT for "a" and "sa"?

--BDS

Reply via email to