23 Jul 00:22
Re: How to determine if a decl is a class member in GCC
From: Benjamin Smedberg <bsmedberg <at> mozilla.com>
Subject: Re: How to determine if a decl is a class member in GCC
Newsgroups: gmane.comp.gcc.devel
Date: 2008-07-22 22:22:32 GMT
Subject: Re: How to determine if a decl is a class member in GCC
Newsgroups: gmane.comp.gcc.devel
Date: 2008-07-22 22:22:32 GMT
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
RSS Feed