This is the mail archive of the gcc-patches@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: [C++ patch] [PR 9283] Implement per-class visibility (newpatch)


On Mon, 05 Apr 2004 04:21:21 -0700, Brian Ryner <bryner@brianryner.com> wrote:

> I do have a couple of things in the patch I'm not 100% sure about:
> - In c-common.c (handle_visibility_attribute), is the TREE_CODE (*node) !=
> RECORD_TYPE correct?

No, you also need to check for UNION_TYPE.  Also, the code to deal with the
type case should move after the code to ignore invalid usage.

> - In rtti.c (tinfo_base_init), is 'target' the correct type to get the
> visibility from?

It seems to be.

> + /* Convenience macro for class visibility.  */
> + #define CURRENT_VISIBILITY  DECL_VISIBILITY (TYPE_NAME (current_class_type))

I don't like this.  You might do something like

#define CLASSTYPE_VISIBILITY(TYPE) DECL_VISIBILITY (TYPE_NAME (TYPE))

however.

Jason


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