OSDN Git Service

2005-07-08 Daniel Berlin <dberlin@dberlin.org>
[pf3gnuchains/gcc-fork.git] / gcc / cp / cp-tree.h
index 7edb1e6..b897ee2 100644 (file)
@@ -174,15 +174,15 @@ struct diagnostic_context;
 #define NON_THUNK_FUNCTION_CHECK(NODE) __extension__                   \
 ({  const tree __t = (NODE);                                           \
     if (TREE_CODE (__t) != FUNCTION_DECL &&                            \
-       TREE_CODE (__t) != TEMPLATE_DECL && __t->decl.lang_specific     \
-       && __t->decl.lang_specific->decl_flags.thunk_p)                 \
+       TREE_CODE (__t) != TEMPLATE_DECL && __t->decl_common.lang_specific      \
+       && __t->decl_common.lang_specific->decl_flags.thunk_p)                  \
       tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0);    \
     __t; })
 #define THUNK_FUNCTION_CHECK(NODE) __extension__                       \
 ({  const tree __t = (NODE);                                           \
-    if (TREE_CODE (__t) != FUNCTION_DECL || !__t->decl.lang_specific   \
-       || !__t->decl.lang_specific->decl_flags.thunk_p)                \
-      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0);    \
+    if (TREE_CODE (__t) != FUNCTION_DECL || !__t->decl_common.lang_specific    \
+       || !__t->decl_common.lang_specific->decl_flags.thunk_p)         \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0);    \
      __t; })
 #else
 #define NON_THUNK_FUNCTION_CHECK(NODE) (NODE)
@@ -1992,7 +1992,7 @@ struct lang_decl GTY(())
 /* In a NAMESPACE_DECL, the list of namespaces which have associated
    themselves with this one.  */
 #define DECL_NAMESPACE_ASSOCIATIONS(NODE) \
-  (NAMESPACE_DECL_CHECK (NODE)->decl.saved_tree)
+  (NAMESPACE_DECL_CHECK (NODE)->decl_non_common.saved_tree)
 
 /* In a NAMESPACE_DECL, points to the original namespace if this is
    a namespace alias.  */
@@ -2007,15 +2007,13 @@ struct lang_decl GTY(())
    && CP_DECL_CONTEXT (NODE) == global_namespace       \
    && DECL_NAME (NODE) == std_identifier)
 
-/* In a non-local VAR_DECL with static storage duration, this is the
-   initialization priority.  If this value is zero, the NODE will be
-   initialized at the DEFAULT_INIT_PRIORITY.  */
-#define DECL_INIT_PRIORITY(NODE) (VAR_DECL_CHECK (NODE)->decl.u2.i)
-
 /* In a TREE_LIST concatenating using directives, indicate indirect
    directives  */
 #define TREE_INDIRECT_USING(NODE) (TREE_LIST_CHECK (NODE)->common.lang_flag_0)
 
+extern tree decl_shadowed_for_var_lookup (tree);
+extern void decl_shadowed_for_var_insert (tree, tree);
+
 /* Non zero if this is a using decl for a dependent scope. */
 #define DECL_DEPENDENT_P(NODE) DECL_LANG_FLAG_0 (USING_DECL_CHECK (NODE))
 
@@ -2025,9 +2023,18 @@ struct lang_decl GTY(())
 /* The decls named by a using decl.  */
 #define USING_DECL_DECLS(NODE) DECL_INITIAL (USING_DECL_CHECK (NODE))
 
+/* In a VAR_DECL, true if we have a shadowed local variable
+   in the shadowed var table for this VAR_DECL.  */
+#define DECL_HAS_SHADOWED_FOR_VAR_P(NODE) \
+  (VAR_DECL_CHECK (NODE)->decl_with_vis.shadowed_for_var_p)
+
 /* In a VAR_DECL for a variable declared in a for statement,
    this is the shadowed (local) variable.  */
-#define DECL_SHADOWED_FOR_VAR(NODE) DECL_RESULT_FLD(VAR_DECL_CHECK (NODE))
+#define DECL_SHADOWED_FOR_VAR(NODE) \
+  (DECL_HAS_SHADOWED_FOR_VAR_P(NODE) ? decl_shadowed_for_var_lookup (NODE) : NULL)
+
+#define SET_DECL_SHADOWED_FOR_VAR(NODE, VAL) \
+  (decl_shadowed_for_var_insert (NODE, VAL))
 
 /* In a FUNCTION_DECL, this is nonzero if this function was defined in
    the class definition.  We have saved away the text of the function,
@@ -2300,7 +2307,7 @@ struct lang_decl GTY(())
 /* Nonzero if NODE is a FUNCTION_DECL for a built-in function, and we have
    not yet seen a prototype for that function.  */
 #define DECL_ANTICIPATED(NODE) \
-  (DECL_LANG_SPECIFIC (DECL_CHECK (NODE))->decl_flags.anticipated_p)
+  (DECL_LANG_SPECIFIC (DECL_COMMON_CHECK (NODE))->decl_flags.anticipated_p)
 
 /* Record whether a typedef for type `int' was actually `signed int'.  */
 #define C_TYPEDEF_EXPLICITLY_SIGNED(EXP) DECL_LANG_FLAG_1 (EXP)
@@ -2622,7 +2629,7 @@ struct lang_decl GTY(())
    TEMPLATE_PARM_INDEX for the parameter is available as the
    DECL_INITIAL (for a PARM_DECL) or as the TREE_TYPE (for a
    TYPE_DECL).  */
-#define DECL_TEMPLATE_PARMS(NODE)       DECL_ARGUMENTS (NODE)
+#define DECL_TEMPLATE_PARMS(NODE)       DECL_NON_COMMON_CHECK (NODE)->decl_non_common.arguments
 #define DECL_INNERMOST_TEMPLATE_PARMS(NODE) \
    INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (NODE))
 #define DECL_NTPARMS(NODE) \