re PR c++/55877 (Anon visibility issues)
[gcc.git] / gcc / cp / cp-tree.h
index c2bd04ecf1cf0d04d33839494783624cc45aec56..3db18f3eaecd4914f99be94d649614f58225988c 100644 (file)
@@ -65,6 +65,7 @@ c-common.h, not after.
       TARGET_EXPR_IMPLICIT_P (in TARGET_EXPR)
       TEMPLATE_PARM_PARAMETER_PACK (in TEMPLATE_PARM_INDEX)
       ATTR_IS_DEPENDENT (in the TREE_LIST for an attribute)
+      ABI_TAG_IMPLICIT (in the TREE_LIST for the argument of abi_tag)
       CONSTRUCTOR_IS_DIRECT_INIT (in CONSTRUCTOR)
       LAMBDA_EXPR_CAPTURES_THIS_P (in LAMBDA_EXPR)
       DECLTYPE_FOR_LAMBDA_CAPTURE (in DECLTYPE_TYPE)
@@ -1048,6 +1049,8 @@ struct GTY(()) saved_scope {
   cp_binding_level *class_bindings;
   cp_binding_level *bindings;
 
+  struct pointer_map_t *x_local_specializations;
+
   struct saved_scope *prev;
 };
 
@@ -1097,6 +1100,12 @@ struct GTY(()) saved_scope {
 
 #define previous_class_level scope_chain->x_previous_class_level
 
+/* A map from local variable declarations in the body of the template
+   presently being instantiated to the corresponding instantiated
+   local variables.  */
+
+#define local_specializations scope_chain->x_local_specializations
+
 /* A list of private types mentioned, for deferred access checking.  */
 
 extern GTY(()) struct saved_scope *scope_chain;
@@ -1126,6 +1135,7 @@ struct GTY(()) language_function {
   BOOL_BITFIELD returns_value : 1;
   BOOL_BITFIELD returns_null : 1;
   BOOL_BITFIELD returns_abnormally : 1;
+  BOOL_BITFIELD infinite_loop: 1;
   BOOL_BITFIELD x_in_function_try_handler : 1;
   BOOL_BITFIELD x_in_base_initializer : 1;
 
@@ -1135,6 +1145,9 @@ struct GTY(()) language_function {
   htab_t GTY((param_is(struct named_label_entry))) x_named_labels;
   cp_binding_level *bindings;
   vec<tree, va_gc> *x_local_names;
+  /* Tracking possibly infinite loops.  This is a vec<tree> only because
+     vec<bool> doesn't work with gtype.  */
+  vec<tree, va_gc> *infinite_loops;
   htab_t GTY((param_is (struct cxx_int_tree_map))) extern_decl_map;
 };
 
@@ -1193,6 +1206,12 @@ struct GTY(()) language_function {
 #define current_function_returns_abnormally \
   cp_function_chain->returns_abnormally
 
+/* Set to 0 at beginning of a function definition, set to 1 if we see an
+   obvious infinite loop.  This can have false positives and false
+   negatives, so it should only be used as a heuristic.  */
+
+#define current_function_infinite_loop cp_function_chain->infinite_loop
+
 /* Nonzero if we are processing a base initializer.  Zero elsewhere.  */
 #define in_base_initializer cp_function_chain->x_in_base_initializer
 
@@ -2589,6 +2608,10 @@ struct GTY((variable_size)) lang_decl {
    must be applied at instantiation time.  */
 #define ATTR_IS_DEPENDENT(NODE) TREE_LANG_FLAG_0 (TREE_LIST_CHECK (NODE))
 
+/* In a TREE_LIST in the argument of attribute abi_tag, indicates that the tag
+   was inherited from a template parameter, not explicitly indicated.  */
+#define ABI_TAG_IMPLICIT(NODE) TREE_LANG_FLAG_0 (TREE_LIST_CHECK (NODE))
+
 extern tree decl_shadowed_for_var_lookup (tree);
 extern void decl_shadowed_for_var_insert (tree, tree);
 
@@ -5281,6 +5304,7 @@ extern tree grokfield (const cp_declarator *, cp_decl_specifier_seq *,
 extern tree grokbitfield (const cp_declarator *, cp_decl_specifier_seq *,
                          tree, tree);
 extern tree cp_reconstruct_complex_type                (tree, tree);
+extern bool attributes_naming_typedef_ok       (tree);
 extern void cplus_decl_attributes              (tree *, tree, int);
 extern void finish_anon_union                  (tree);
 extern void cp_write_global_declarations       (void);
@@ -5289,12 +5313,15 @@ extern tree coerce_delete_type                  (tree);
 extern void comdat_linkage                     (tree);
 extern void determine_visibility               (tree);
 extern void constrain_class_visibility         (tree);
+extern void reset_type_linkage                 (tree);
+extern void tentative_decl_linkage             (tree);
 extern void import_export_decl                 (tree);
 extern tree build_cleanup                      (tree);
 extern tree build_offset_ref_call_from_tree    (tree, vec<tree, va_gc> **,
                                                 tsubst_flags_t);
 extern bool decl_constant_var_p                        (tree);
 extern bool decl_maybe_constant_var_p          (tree);
+extern void no_linkage_error                   (tree);
 extern void check_default_args                 (tree);
 extern bool mark_used                          (tree);
 extern bool mark_used                          (tree, tsubst_flags_t);
@@ -5666,6 +5693,7 @@ extern bool perform_or_defer_access_check (tree, tree, tree,
 extern int stmts_are_full_exprs_p              (void);
 extern void init_cp_semantics                  (void);
 extern tree do_poplevel                                (tree);
+extern void break_maybe_infinite_loop          (void);
 extern void add_decl_expr                      (tree);
 extern tree maybe_cleanup_point_expr_void      (tree);
 extern tree finish_expr_stmt                   (tree);
@@ -5744,7 +5772,7 @@ extern tree finish_stmt_expr_expr         (tree, tree);
 extern tree finish_stmt_expr                   (tree, bool);
 extern tree stmt_expr_value_expr               (tree);
 bool empty_expr_stmt_p                         (tree);
-extern tree perform_koenig_lookup              (tree, vec<tree, va_gc> *, bool,
+extern tree perform_koenig_lookup              (tree, vec<tree, va_gc> *,
                                                 tsubst_flags_t);
 extern tree finish_call_expr                   (tree, vec<tree, va_gc> **, bool,
                                                 bool, tsubst_flags_t);