This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ patch] [PR 9283] Implement per-class visibility (newpatch)
- From: Jason Merrill <jason at redhat dot com>
- To: Brian Ryner <bryner at brianryner dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Apr 2004 18:29:53 -0400
- Subject: Re: [C++ patch] [PR 9283] Implement per-class visibility (newpatch)
- References: <40714131.2010602@brianryner.com>
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