OSDN Git Service

PR c/12913
[pf3gnuchains/gcc-fork.git] / gcc / c-tree.h
index c6e0ca9..c7cbd13 100644 (file)
@@ -86,7 +86,8 @@ struct lang_type GTY(())
 
 /* For FUNCTION_DECLs, evaluates true if the decl is built-in but has
    been declared.  */
-#define C_DECL_DECLARED_BUILTIN(EXP) DECL_LANG_FLAG_3 (EXP)
+#define C_DECL_DECLARED_BUILTIN(EXP)           \
+  DECL_LANG_FLAG_3 (FUNCTION_DECL_CHECK (EXP))
 
 /* Record whether a decl was declared register.  This is strictly a
    front-end flag, whereas DECL_REGISTER is used for code generation;
@@ -97,7 +98,7 @@ struct lang_type GTY(())
    unevaluated operand of sizeof / typeof / alignof.  This is only
    used for functions declared static but not defined, though outside
    sizeof and typeof it is set for other function decls as well.  */
-#define C_DECL_USED(EXP) DECL_LANG_FLAG_5 (EXP)
+#define C_DECL_USED(EXP) DECL_LANG_FLAG_5 (FUNCTION_DECL_CHECK (EXP))
 
 /* Record whether a label was defined in a statement expression which
    has finished and so can no longer be jumped to.  */
@@ -110,6 +111,18 @@ struct lang_type GTY(())
 #define C_DECL_UNDEFINABLE_STMT_EXPR(EXP)      \
   DECL_LANG_FLAG_7 (LABEL_DECL_CHECK (EXP))
 
+/* Record whether a label was defined in the scope of an identifier
+   with variably modified type which has finished and so can no longer
+   be jumped to.  */
+#define C_DECL_UNJUMPABLE_VM(EXP)      \
+  DECL_LANG_FLAG_3 (LABEL_DECL_CHECK (EXP))
+
+/* Record whether a label was the subject of a goto from outside the
+   current level of scopes of identifiers with variably modified type
+   and so cannot be defined right now.  */
+#define C_DECL_UNDEFINABLE_VM(EXP)     \
+  DECL_LANG_FLAG_5 (LABEL_DECL_CHECK (EXP))
+
 /* Nonzero for a decl which either doesn't exist or isn't a prototype.
    N.B. Could be simplified if all built-in decls had complete prototypes
    (but this is presently difficult because some of them need FILE*).  */
@@ -354,8 +367,8 @@ struct language_function GTY(())
   int extern_inline;
 };
 
-/* Save lists of labels used or defined in particular statement
-   expression contexts.  Allocated on the parser obstack.  */
+/* Save lists of labels used or defined in particular contexts.
+   Allocated on the parser obstack.  */
 
 struct c_label_list
 {
@@ -365,14 +378,32 @@ struct c_label_list
   struct c_label_list *next;
 };
 
-struct c_label_context
+/* Statement expression context.  */
+
+struct c_label_context_se
+{
+  /* The labels defined at this level of nesting.  */
+  struct c_label_list *labels_def;
+  /* The labels used at this level of nesting.  */
+  struct c_label_list *labels_used;
+  /* The next outermost context.  */
+  struct c_label_context_se *next;
+};
+
+/* Context of variably modified declarations.  */
+
+struct c_label_context_vm
 {
   /* The labels defined at this level of nesting.  */
   struct c_label_list *labels_def;
   /* The labels used at this level of nesting.  */
   struct c_label_list *labels_used;
+  /* The scope of this context.  Multiple contexts may be at the same
+     numbered scope, since each variably modified declaration starts a
+     new context.  */
+  unsigned scope;
   /* The next outermost context.  */
-  struct c_label_context *next;
+  struct c_label_context_vm *next;
 };
 
 \f
@@ -477,7 +508,8 @@ extern int in_sizeof;
 extern int in_typeof;
 
 extern struct c_switch *c_switch_stack;
-extern struct c_label_context *label_context_stack;
+extern struct c_label_context_se *label_context_stack_se;
+extern struct c_label_context_vm *label_context_stack_vm;
 
 extern tree require_complete_type (tree);
 extern int same_translation_unit_p (tree, tree);
@@ -532,6 +564,8 @@ extern tree c_finish_return (tree);
 extern tree c_finish_bc_stmt (tree *, bool);
 extern tree c_finish_goto_label (tree);
 extern tree c_finish_goto_ptr (tree);
+extern void c_begin_vm_scope (unsigned int);
+extern void c_end_vm_scope (unsigned int);
 
 /* Set to 0 at beginning of a function definition, set to 1 if
    a return statement that specifies a return value is seen.  */