Go to file
Nathan Sidwell 54380d42e6 c++: Kill nested_udts
During the implementation of modules I added myself a note to
implement nested_udt handling.  It wasn't obvious to me what they were
for and nothing seemed to be broken in ignoring them.  I figured
something would eventually pop up and I'd add support.  Nothing popped up.

Investigating on trunk discovered 3 places where we look at the
nested-udts.  I couldn't figure how the one in lookup_field_r was
needed -- surely the regular lookup would find the type.  It turned
out that code was unreachable.  So we can delete it.

Next in do_type_instantiation, we walk the nested-utd table
instantiating types.  But those types are also on the TYPE_FIELDS
list, which we've just iterated over.  So I can move the handling into
that loop.

The final use is in handling structs that have a typedef name for
linkage purposes.  Again, we can just iterate over TYPE_FIELDS.  (As
commented, we probably don't need to do even that, as a DR, whose
number I forget, requires such structs to only have C-like things in
them.  But I didn't go that far.

Having removed all the uses of nested-udts, I can remove their
creation from name-lookup, and as the only instance of a binding_table
object, we can remove all that code too.

	gcc/cp/
	* cp-tree.h (struct lang_type): Delete nested_udts field.
	(CLASSTYPE_NESTED_UTDS): Delete.
	* name-lookup.h (binding_table, binding_entry): Delete typedefs.
	(bt_foreach_proc): Likewise.
	(struct binding_entry_s): Delete.
	(SCOPE_DEFAULT_HT_SIZE, CLASS_SCOPE_HT_SIZE)
	(NAMESPACE_ORDINARY_HT_SIZE, NAMESPACE_STD_HT_SIZE)
	(GLOBAL_SCOPE_HT_SIZE): Delete.
	(binding_table_foreach, binding_table_find): Delete declarations.
	* name-lookup.c (ENTRY_INDEX): Delete.
	(free_binding_entry): Delete.
	(binding_entry_make, binding_entry_free): Delete.
	(struct binding_table_s): Delete.
	(binding_table_construct, binding_table_free): Delete.
	(binding_table_new, binding_table_expand): Delete.
	(binding_table_insert, binding_table_find): Delete.
	(binding_table_foreach): Delete.
	(maybe_process_template_type_declaration): Delete
	CLASSTYPE_NESTED_UTDS insertion.
	(do_pushtag): Likewise.
	* decl2.c (bt_reset_linkage_1): Fold into reset_type_linkage_1.
	(reset_type_linkage_2, bt_reset_linkage_2): Fold into
	reset_type_linkage.
	* pt.c (instantiate_class_template_1): Delete NESTED_UTDs comment.
	(bt_instantiate_type_proc): Delete.
	(do_type_instantiation): Instantiate implicit typedef fields.
	Delete NESTED_UTD walk.
	* search.c (lookup_field_r): Delete unreachable NESTED_UTD
	search.
2020-10-27 10:07:32 -07:00
config
contrib
fixincludes
gcc c++: Kill nested_udts 2020-10-27 10:07:32 -07:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcpp
libdecnumber
libffi
libgcc gcov-profile: use static pool for TOPN first 2020-10-27 11:49:54 +01:00
libgfortran
libgo syscall: import additional BSD-specific syscall wrappers 2020-10-26 15:04:16 -07:00
libgomp
libhsail-rt
libiberty
libitm
libobjc
liboffloadmic
libphobos d: Remove the d_critsec_size target hook. 2020-10-27 11:50:35 +01:00
libquadmath
libsanitizer
libssp
libstdc++-v3 libstdc++: Fix ODR violations caused by <tr1/functional> 2020-10-27 16:32:53 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with 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/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.