+2019-10-18 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (struct lang_type): Remove was_anonymous.
+ (TYPE_WAS_UNNAMED): Implement by checking TYPE_DECL &
+ TYPE_STUB_DECL.
+ * decl.c (name_unnamed_type): Don't set TYPE_WAS_UNNAMED.
+
2019-10-17 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokfndecl): Remove redundant use of in_system_header_at.
unsigned fields_readonly : 1;
unsigned ptrmemfunc_flag : 1;
- unsigned was_anonymous : 1;
unsigned lazy_default_ctor : 1;
unsigned lazy_copy_ctor : 1;
unsigned lazy_copy_assign : 1;
unsigned has_const_copy_ctor : 1;
unsigned has_complex_copy_ctor : 1;
unsigned has_complex_copy_assign : 1;
-
unsigned non_aggregate : 1;
+
unsigned has_complex_dflt : 1;
unsigned has_list_ctor : 1;
unsigned non_std_layout : 1;
unsigned lazy_move_ctor : 1;
unsigned lazy_move_assign : 1;
unsigned has_complex_move_ctor : 1;
-
unsigned has_complex_move_assign : 1;
+
unsigned has_constexpr_ctor : 1;
unsigned unique_obj_representations : 1;
unsigned unique_obj_representations_set : 1;
/* There are some bits left to fill out a 32-bit word. Keep track
of this by updating the size of this bitfield whenever you add or
remove a flag. */
- unsigned dummy : 4;
+ unsigned dummy : 5;
tree primary_base;
vec<tree_pair_s, va_gc> *vcall_indices;
/* Define fields and accessors for nodes representing declared names. */
-/* Nonzero if TYPE is an unnamed class with a typedef for linkage purposes. */
-#define TYPE_WAS_UNNAMED(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->was_anonymous)
+/* True if TYPE is an unnamed structured type with a typedef for
+ linkage purposes. In that case TYPE_NAME and TYPE_STUB_DECL of the
+ MAIN-VARIANT are different. */
+#define TYPE_WAS_UNNAMED(NODE) \
+ (TYPE_NAME (TYPE_MAIN_VARIANT (NODE)) \
+ != TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE)))
/* C++: all of these are overloaded! These apply only to TYPE_DECLs. */
/*debug_hooks->set_name (t, decl);*/
TYPE_NAME (t) = decl;
- if (TYPE_LANG_SPECIFIC (type))
- TYPE_WAS_UNNAMED (type) = 1;
-
/* If this is a typedef within a template class, the nested
type is a (non-primary) template. The name for the
template needs updating as well. */