This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/9230] Friend functions defined within template class definitions are injected into the namespace scope at template instantiation time even if there is no declaration.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2005 00:58:49 -0000
- Subject: [Bug c++/9230] Friend functions defined within template class definitions are injected into the namespace scope at template instantiation time even if there is no declaration.
- References: <20030108084607.9230.bangerth@ticam.utexas.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-16 00:58 -------
Fixed in 4.1.0 by:
2005-09-12 Ian Lance Taylor <ian@airs.com>
PR g++/7874
* cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
bitfield. Make dummy bitfield one bit smaller.
(DECL_HIDDEN_FRIEND_P): Define.
(pushdecl_maybe_friend): Declare.
(pushdecl_top_level_maybe_friend): Declare.
* decl.c (duplicate_decls): Add newdecl_is_friend parameter.
Change prototype and all callers. Add assertion that a
DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P. Set
DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
appropriate.
....
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9230