This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFC: Proposed patch for PR c++/7874
kaih@khms.westfalen.de (Kai Henningsen) writes:
> ian@airs.com (Ian Lance Taylor) wrote on 06.09.05 in <20050907054240.31559.qmail@gossamer.airs.com>:
>
> > RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
> > retrieving revision 1.1162
> > diff -p -u -r1.1162 cp-tree.h
> > --- cp/cp-tree.h 6 Sep 2005 14:55:03 -0000 1.1162
> > +++ cp/cp-tree.h 7 Sep 2005 04:52:30 -0000
> > @@ -1814,9 +1814,8 @@ struct lang_decl GTY(())
> > #define DECL_INITIALIZED_IN_CLASS_P(DECL) \
> > (DECL_LANG_SPECIFIC (DECL)->decl_flags.initialized_in_class)
> >
> > -/* Nonzero for FUNCTION_DECL means that this decl is just a
> > - friend declaration, and should not be added to the list of
> > - member functions for this class. */
> > +/* Nonzero for DECL means that this decl is just a friend declaration,
> > + and should not be added to the list of members for this class. */
> > #define DECL_FRIEND_P(NODE) (DECL_LANG_SPECIFIC
> > (NODE)->decl_flags.friend_attr)
>
> Umm .... that comment doesn't really make sense. Do you mean "for NODE"?
I'm just updating an existing comment, changing FUNCTION_DECL to DECL.
FUNCTION_DECL is not correct because DECL_FRIEND_P is also set for
class types. The comment makes sense either way to the knowledgeable,
because it is implying that NODE must be a DECL (i.e., DECL_P (NODE)
must be true). This usage is consistent with many macros in tree.h.
Of course this it not a big deal. If somebody wants me to rewrite the
comment to use NODE, I'll do that as a separate patch.
Ian