Go to file
Jason Merrill 30394414d9 Partial implementation of namespaces.
* decl.c (push_namespace): Handle redeclaration error.
	* cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
	(IDENTIFIER_NAMESPACE_BINDINGS): New macro.
	(NAMESPACE_BINDING): New macro.
	(IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
	* *.c: Use them.
	* pt.c (push_template_decl): Use innermost_args.
	* decl.c (get_unique_name): Tweak from earlier in the name.
	* cp-tree.def: Add CPLUS_BINDING node.
	* cp-tree.h (tree_binding): new struct
	(BINDING_SCOPE, BINDING_VALUE): new macros
	(current_namespace, global_namespace): declare extern
	(struct lang_decl_flags): new field in_namespace
	(DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
	(DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
	(TREE_INDIRECT_USING): new macro
	* decl2.c (current_namespace, global_namespace): Declare.  The
	value is a NAMESPACE_DECL now, not a TREE_LIST.
	(is_namespace_ancestor, namespace_ancestor):new static functions.
	(add_using_namespace, ambiguous_decl): likewise.
	(lookup_using_namespace): new support function for lookup_name.
	(qualified_lookup_using_namespace): new support function for
	do_scoped_id and lookup_namespace_name
	(get_namespace_id): mark as obsolete.
	(current_namespace_id): Likewise.
	(do_namespace_alias): Implement.
	(do_using_directive): Implement as call to add_using_namespace.
	* decl.c (binding_for_name): new function.
	(push_namespace, pop_namespace): implement.
	(push_decl): don't install a FUNCTION_DECL in the global branch.
	(lookup_namespace_name): implement using qualified lookup.
	(lookup_name_real): For global scoping, lookup in
	global_namespace. For namespace scoping, lookup in given
	namespace. For unscoped lookup, iterate over namespace,
	considering using directives.
	(init_decl_processing): initialize global_namespace.
	(grokvardecl): Build assembler name as static name for globals.
	(grokdeclarator): Remove old namespace mangling.
	(xref_tag): When installing a global binding for the
	tag, make sure we have an identifier.
	* method.c (build_overload_nested_name): mangle namespaces.
	(build_qualified_name): Likewise.
	(build_decl_overload_real): Likewise.
	* lex.c (build_lang_decl): set namespace for new declaration to
	current_namespace.
	(do_scoped_id): find global names in global or current
	namespace, or using qualified namespace lookup, depending on
	context.
	* init.c (build_member_call): When scope is namespace, use
	build_x_function_call instead.
	(build_offset_ref): When scope is namespace, collapse processing
	to lookup_namespace_name instead.
	* error.c (dump_decl): Support NAMESPACE_DECL.
	* decl.c (pushdecl): Bind globals to current namespace.
	(push_overloaded_decl): Likewise.
	(lookup_tag): Likewise.
	(lookup_name_current_level): Likewise.
	(xref_tag): Likewise.
	(start_function): Likewise.
	* lex.c (do_identifier): Likewise.
	(identifier_typedecl_value): Likewise.
	(real_yylex): Likewise.
	* method.c (do_inline_function_hair): Likewise.
	* parse.y (unscoped): Likewise.
	* pt.c (check_explicit_specialization): Likewise.
	(lookup_template_class): Likewise.
	* rtti.c (call_void_fn): Likewise.
	* sig.c (build_sigtable): Likewise.
	* ptree.c (lang_print_xnode): New function.

From-SVN: r18227
1998-02-24 19:49:51 -05:00
config Makefile.in (BASE_FLAGS_TO_PASS): Don't pass PICFLAG and PICFLAG_FOR_TARGET. 1998-02-05 17:33:04 -07:00
etc Makefile.in: Add --no-split argument to avoid creating files with names longer than 14... 1997-11-21 20:36:36 -07:00
gcc Partial implementation of namespaces. 1998-02-24 19:49:51 -05:00
include Initial revision 1997-08-21 18:57:35 -04:00
INSTALL Add documentation for OpenServer patch required for static [cd]tors 1998-02-11 23:17:04 +00:00
libf2c Update address. 1998-02-23 14:57:23 -07:00
libiberty Update address. 1998-02-23 14:57:23 -07:00
libio Changes for _G_IO_IO_FILE_VERSION == 0x20001: 1998-02-24 13:09:55 -07:00
libstdc++ ropeimpl.h: Check __STL_PTHREADS instead of _PTHREADS. 1998-02-20 06:13:44 -05:00
texinfo Update address. 1998-02-23 14:57:23 -07:00
xiberty Initial revision 1997-08-21 18:57:35 -04:00
.cvsignore * .cvsignore (*-install): Remove. 1997-09-04 09:49:02 -06:00
ChangeLog * config.sub (sco5): Fix typo. 1998-02-23 13:16:17 +00:00
config-ml.in config-ml.in (multi-do): LDFLAGS must include multilib designator. 1998-01-13 14:01:03 -07:00
config.guess config.guess: More accurate determination of HP processor types. 1998-01-27 15:15:40 -07:00
config.sub * config.sub (sco5): Fix typo. 1998-02-23 13:16:17 +00:00
configure Makefile.in (BASE_FLAGS_TO_PASS): Don't pass PICFLAG and PICFLAG_FOR_TARGET. 1998-02-05 17:33:04 -07:00
configure.in Makefile.in (TARGET_CONFIGDIRS): Add libf2c. 1998-01-31 18:41:24 -07:00
COPYING Initial revision 1997-08-21 18:57:35 -04:00
COPYING.LIB Update address. 1998-02-23 14:57:23 -07:00
install-sh Initial revision 1997-08-21 18:57:35 -04:00
ltconfig Initial revision 1997-08-21 18:57:35 -04:00
ltmain.sh Initial revision 1997-08-21 18:57:35 -04:00
MAINTAINERS Various minor tweaks. 1998-02-17 14:21:20 -07:00
Makefile.in Makefile.in ($(CONFIGURE_TARGET_MODULES)): Run configure with CONFIG_SITE=/dev/null to forestall lossage with site... 1998-02-17 17:18:26 -07:00
missing Initial revision 1997-08-21 18:57:35 -04:00
mkinstalldirs Initial revision 1997-08-21 18:57:35 -04:00
move-if-change Initial revision 1997-08-21 18:57:35 -04:00
mpw-build.in Initial revision 1997-08-21 18:57:35 -04:00
mpw-config.in Initial revision 1997-08-21 18:57:35 -04:00
mpw-configure Initial revision 1997-08-21 18:57:35 -04:00
mpw-install ignored by import 1997-08-21 19:14:36 -04:00
mpw-README Initial revision 1997-08-21 18:57:35 -04:00
README Initial revision 1997-08-21 18:57:35 -04:00
symlink-tree Initial revision 1997-08-21 18:57:35 -04:00
ylwrap Initial revision 1997-08-21 18:57:35 -04:00

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.