re PR target/81521 (After [r250413] GCC 8.0 doesn't compile for Windows)

PR bootstrap/81521
	* tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
	documentation.
	* doc/generic.texi: Likewise.
	* config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
	for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.

From-SVN: r250476
This commit is contained in:
Jakub Jelinek 2017-07-24 15:02:06 +02:00 committed by Jakub Jelinek
parent 4b40986c04
commit 570e228b5e
4 changed files with 23 additions and 23 deletions

View File

@ -1,3 +1,12 @@
2017-07-24 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/81521
* tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
documentation.
* doc/generic.texi: Likewise.
* config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
2017-07-24 Jackson Woodruff <jackson.woodruff@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.

View File

@ -114,14 +114,11 @@ i386_pe_adjust_class_at_definition (tree t)
decl_attributes (&ti_decl, na, 0);
}
/* Check static VAR_DECL's. */
/* Check FUNCTION_DECL's and static VAR_DECL's. */
for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == VAR_DECL)
maybe_add_dllexport (member);
/* Check FUNCTION_DECL's. */
for (member = TYPE_METHODS (t); member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == FUNCTION_DECL)
else if (TREE_CODE (member) == FUNCTION_DECL)
{
tree thunk;
maybe_add_dllexport (member);
@ -132,7 +129,8 @@ i386_pe_adjust_class_at_definition (tree t)
maybe_add_dllexport (thunk);
}
/* Check vtables */
for (member = CLASSTYPE_VTABLES (t); member; member = DECL_CHAIN (member))
for (member = CLASSTYPE_VTABLES (t);
member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == VAR_DECL)
maybe_add_dllexport (member);
}

View File

@ -2820,7 +2820,6 @@ This function cannot be used with namespaces that have
@findex BINFO_TYPE
@findex TYPE_FIELDS
@findex TYPE_VFIELD
@findex TYPE_METHODS
Besides namespaces, the other high-level scoping construct in C++ is the
class. (Throughout this manual the term @dfn{class} is used to mean the
@ -2837,7 +2836,7 @@ macro to discern whether or not a particular type is a @code{class} as
opposed to a @code{struct}. This macro will be true only for classes
declared with the @code{class} tag.
Almost all non-function members are available on the @code{TYPE_FIELDS}
Almost all members are available on the @code{TYPE_FIELDS}
list. Given one member, the next can be found by following the
@code{TREE_CHAIN}. You should not depend in any way on the order in
which fields appear on this list. All nodes on this list will be
@ -2849,7 +2848,11 @@ list, if the enumeration type was declared in the class. (Of course,
the @code{TYPE_DECL} for the enumeration type will appear here as well.)
There are no entries for base classes on this list. In particular,
there is no @code{FIELD_DECL} for the ``base-class portion'' of an
object.
object. If a function member is overloaded, each of the overloaded
functions appears; no @code{OVERLOAD} nodes appear on the @code{TYPE_FIELDS}
list. Implicitly declared functions (including default constructors,
copy constructors, assignment operators, and destructors) will appear on
this list as well.
The @code{TYPE_VFIELD} is a compiler-generated field used to point to
virtual function tables. It may or may not appear on the
@ -2857,14 +2860,6 @@ virtual function tables. It may or may not appear on the
@code{TYPE_VFIELD} just like all the entries on the @code{TYPE_FIELDS}
list.
The function members are available on the @code{TYPE_METHODS} list.
Again, subsequent members are found by following the @code{TREE_CHAIN}
field. If a function is overloaded, each of the overloaded functions
appears; no @code{OVERLOAD} nodes appear on the @code{TYPE_METHODS}
list. Implicitly declared functions (including default constructors,
copy constructors, assignment operators, and destructors) will appear on
this list as well.
Every class has an associated @dfn{binfo}, which can be obtained with
@code{TYPE_BINFO}. Binfos are used to represent base-classes. The
binfo given by @code{TYPE_BINFO} is the degenerate case, whereby every

View File

@ -112,10 +112,7 @@ DEFTREECODE (BLOCK, "block", tcc_exceptional, 0)
itself or have named members doesn't really have a "scope" per se.
The TYPE_STUB_DECL field is used as a forward-references to names for
ENUMERAL_TYPE, RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE nodes;
see below.
The TYPE_METHODS points to list of all methods associated with the type.
It is non-NULL only at main variant of the type and after free_lang_data
it may be set to error_mark_node instead of actual list to save memory. */
see below. */
/* The ordering of the following codes is optimized for the checking
macros in tree.h. Changing the order will degrade the speed of the
@ -213,8 +210,9 @@ DEFTREECODE (ARRAY_TYPE, "array_type", tcc_type, 0)
/* Struct in C, or record in Pascal. */
/* Special fields:
TYPE_FIELDS chain of FIELD_DECLs for the fields of the struct,
and VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
types and enumerators.
VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
types and enumerators and FUNCTION_DECLs for methods associated
with the type.
A few may need to be added for Pascal. */
/* See the comment above, before ENUMERAL_TYPE, for how
forward references to struct tags are handled in C. */