Go to file
Ian Lance Taylor d63d5d0c32 re PR c++/7874 (g++ finds friend functions defined in class-definition but not declared in the enclosing namespace)
./	PR g++/7874
	* c.opt (ffriend-injection): New C++ option.
	* doc/invoke.texi (Option Summary): Mention -ffriend-injection.
	(C++ Dialect Options): Document -ffriend-injection.
cp/
	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.
	* name-lookup.c (supplement_binding): Don't ignore a
	DECL_HIDDEN_FRIEND_P.
	(pushdecl_maybe_friend): Break out contents of pushdecl.  Add
	is_friend parameter.  Set DECL_ANTICIPATED and
	DECL_HIDDEN_FRIEND_P for a friend function.
	(pushdecl): Just call pushdecl_maybe_friend.
	(pushdecl_with_scope): Add is_friend parameter.  Change prototype
	and all callers.
	(pushdecl_namespace_level): Likewise.
	(push_overloaded_decl): Likewise.  Check DECL_HIDDEN_FRIEND_P as
	well as DECL_ANTICIPATED when checking for a builtin.
	(do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
	DECL_ANTICIPATED when checking for a builtin.
	(do_nonmember_using_decl): Likewise.
	(pushdecl_top_level_1): Add is_friend parameter.  Change all
	callers.
	(pushdecl_top_level_maybe_friend): New function.
	(remove_hidden_names): New function.
	(struct arg_lookup): Add args field.
	(friend_of_associated_class_p): New static function.
	(arg_assoc_namespace): Ignore hidden functions which are not
	friends of an associated class of some argument.
	(lookup_arg_dependent): Remove hidden functions from list passed
	in.  Initialize k.args.
	* name-lookup.h (remove_hidden_names): Declare.
	* friend.c (do_friend): Call pushdecl_maybe_friend instead of
	pushdecl.
	* call.c (add_function_candidate): Change DECL_ANTICIPATED test to
	an assertion, with a check for DECL_HIDDEN_FRIEND_P.
	(build_new_function_call): Add koenig_p parameter.  Change
	prototype and callers.
	* pt.c (register_specialization): Add is_friend parameter.  Change
	all callers.
	(push_template_decl_real): Change is_friend parameter to bool.
	Change prototype and all callers.
	(tsubst_friend_class): Call pushdecl_top_level_maybe_friend
	instead of pushdecl_top_level.
testsuite/
	PR g++/7874
	* g++.dg/lookup/friend7.C: New test.
	* g++.dg/lookup/friend8.C: New test.
	* g++.dg/parse/defarg4.C: Add a parameter to the friend function,
	so that it will be found via argument dependent lookup.
	* g++.old-deja/g++.brendan/crash56.C: Don't expect errors for
	friend functions which will no longer be found.
	* g++.old-deja/g++.jason/friend.C: Add a parameter to the friend
	function g, so that it will be found via argument dependent
	lookup.
	* g++.old-deja/g++.jason/scoping15.C: Use -ffriend-injection.
	* g++.old-deja/g++.mike/net43.C: Likewise.

From-SVN: r104188
2005-09-12 19:54:23 +00:00
boehm-gc re PR boehm-gc/23662 (Binaries generated by arm-linux-gcj segfault on execution on arm target) 2005-09-06 14:22:01 +00:00
config configure.in: Replace NCN_STRICT_CHECK_TOOL with NCN_STRICT_CHECK_TOOLS... 2005-08-12 14:18:46 +00:00
contrib * gcc_update: Update dependencies for libjava/aclocal.m4. 2005-08-23 10:55:08 +10:00
fastjar all files: Update FSF address. 2005-06-29 02:59:06 +00:00
fixincludes All files: Update with new FSF address. 2005-08-15 00:50:43 +00:00
gcc re PR c++/7874 (g++ finds friend functions defined in class-definition but not declared in the enclosing namespace) 2005-09-12 19:54:23 +00:00
gnattools re PR ada/19959 (Can't compile gnattools for the cross targets) 2005-03-30 10:56:55 +02:00
include floatformat.c (floatformat_always_valid): Change type of last argument to `void *'. 2005-08-17 13:30:47 -04:00
INSTALL
intl Update the address and telephone number of the FSF organization 2005-05-13 08:03:47 +00:00
libada Fix ada enabled "make html". 2005-04-27 18:39:03 -07:00
libcpp be.po, [...]: Update. 2005-09-04 13:28:33 +01:00
libffi re PR target/23404 (gij trashes args of functions with more than 8 fp args) 2005-08-25 10:24:54 +09:30
libgfortran re PR libfortran/20179 (cannot mix C and Fortran I/O) 2005-09-11 13:34:57 +00:00
libiberty floatformat.c (floatformat_always_valid): Change type of last argument to `void *'. 2005-08-17 13:30:47 -04:00
libjava URLClassLoader.java (addURLImpl): Synchronize on the loader. 2005-09-09 13:06:24 +00:00
libmudflap Fix FreeBSD fopen instrumentation. 2005-08-22 17:12:18 -07:00
libobjc re PR libobjc/23108 (alignment bug in libobjc/archive.c) 2005-09-04 10:05:39 -07:00
libssp ALL: Update FSF address. 2005-08-17 03:26:45 +00:00
libstdc++-v3 re PR libstdc++/23417 (bits/stl_tree.h isn't -Weffc++ clean) 2005-09-12 19:48:04 +00:00
maintainer-scripts gcc_release: Update with FSF address. 2005-08-15 01:01:02 +00:00
zlib * Imported zlib 1.2.3; merged local changes. 2005-09-12 17:42:53 +00:00
.cvsignore
ABOUT-NLS intl: New directory; see intl/ChangeLog for details. 2003-07-04 18:18:54 +00:00
ChangeLog configure.in (*-*-vxworks*): Add target-libstdc++-v3 to noconfigdirs. 2005-09-01 17:42:56 +00:00
ChangeLog.tree-ssa Merge tree-ssa-20020619-branch into mainline. 2004-05-13 02:41:07 -04:00
compile COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
config-ml.in COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
config.guess COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
config.rpath all files: Update FSF address. 2005-07-16 02:30:53 +00:00
config.sub COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
configure configure.in (*-*-vxworks*): Add target-libstdc++-v3 to noconfigdirs. 2005-09-01 17:42:56 +00:00
configure.in configure.in (*-*-vxworks*): Add target-libstdc++-v3 to noconfigdirs. 2005-09-01 17:42:56 +00:00
COPYING COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
COPYING.LIB Update COPYING.LIB from upstream. Correct last Changelog. 2005-07-14 01:41:54 +00:00
depcomp top level: 2005-06-13 08:26:05 +00:00
install-sh COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
libtool.m4 all files: Update FSF address. 2005-07-16 02:30:53 +00:00
ltcf-c.sh all files: Update FSF address. 2005-07-16 02:30:53 +00:00
ltcf-cxx.sh all files: Update FSF address. 2005-07-16 02:30:53 +00:00
ltcf-gcj.sh all files: Update FSF address. 2005-07-16 02:30:53 +00:00
ltconfig all files: Update FSF address. 2005-07-16 02:30:53 +00:00
ltmain.sh all files: Update FSF address. 2005-07-16 02:30:53 +00:00
MAINTAINERS * MAINTAINERS: Add self as ms1 maintainer. 2005-08-22 16:54:35 +00:00
Makefile.def Makefile.def (libssp): Add to lang_env_dependencies. 2005-08-20 13:43:17 +00:00
Makefile.in Makefile.def (libssp): Add to lang_env_dependencies. 2005-08-20 13:43:17 +00:00
Makefile.tpl Makefile.tpl: (USUAL_CC_FOR_TARGET): Add missing trailing slash. 2005-08-17 15:59:29 +00:00
missing COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
mkdep
mkinstalldirs COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
move-if-change all files: Update FSF address. 2005-07-16 02:30:53 +00:00
README
README.SCO * README.SCO: Update the URL. 2005-05-08 17:49:46 +00:00
symlink-tree COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00
ylwrap COPYING, [...]: Sync from upstream sources. 2005-07-14 01:08:13 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the file COPYING
for copying permission.  The manuals, and some of the runtime
libraries, are under different terms; see the individual source files
for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs.html for how to report bugs usefully.