OSDN Git Service

* c-common.h (enum rid): Remove RID_BOUNDED, RID_UNBOUNDED.
[pf3gnuchains/gcc-fork.git] / gcc / c-common.h
index b4a14a3..4f82b8f 100644 (file)
@@ -58,7 +58,7 @@ enum rid
   RID_VOLATILE, RID_SIGNED,  RID_AUTO,  RID_RESTRICT,
 
   /* C extensions */
-  RID_BOUNDED, RID_UNBOUNDED, RID_COMPLEX, RID_THREAD,
+  RID_COMPLEX, RID_THREAD,
 
   /* C++ */
   RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE,
@@ -305,7 +305,6 @@ struct c_language_function GTY(()) {
 
 /* Language-specific hooks.  */
 
-extern int (*lang_statement_code_p)             PARAMS ((enum tree_code));
 extern void (*lang_expand_stmt)                 PARAMS ((tree));
 extern void (*lang_expand_decl_stmt)            PARAMS ((tree));
 extern void (*lang_expand_function_end)         PARAMS ((void));
@@ -326,18 +325,18 @@ extern void add_decl_stmt                       PARAMS ((tree));
 extern tree add_scope_stmt                      PARAMS ((int, int));
 extern void finish_stmt_tree                    PARAMS ((tree *));
 
-extern int statement_code_p                     PARAMS ((enum tree_code));
 extern tree walk_stmt_tree                     PARAMS ((tree *,
                                                         walk_tree_fn,
                                                         void *));
 extern void prep_stmt                           PARAMS ((tree));
 extern void expand_stmt                         PARAMS ((tree));
-extern void shadow_warning                     PARAMS ((const char *,
-                                                        tree, tree));
 extern tree c_begin_if_stmt                    PARAMS ((void));
 extern tree c_begin_while_stmt                 PARAMS ((void));
 extern void c_finish_while_stmt_cond           PARAMS ((tree, tree));
 
+enum sw_kind { SW_PARAM = 0, SW_LOCAL, SW_GLOBAL };
+extern void shadow_warning                     PARAMS ((enum sw_kind,
+                                                        const char *, tree));
 
 /* Extra information associated with a DECL.  Other C dialects extend
    this structure in various ways.  The C front-end only uses this
@@ -435,10 +434,6 @@ extern int flag_no_asm;
 
 extern int flag_const_strings;
 
-/* Nonzero means `$' can be in an identifier.  */
-
-extern int dollars_in_ident;
-
 /* Nonzero means to treat bitfields as signed unless they say `unsigned'.  */
 
 extern int flag_signed_bitfields;
@@ -782,6 +777,10 @@ extern int flag_abi_version;
 
 extern int warn_abi;
 
+/* Nonzero means warn about invalid uses of offsetof. */
+extern int warn_invalid_offsetof;
+
 /* Nonzero means warn about implicit declarations.  */
 
 extern int warn_implicit;
@@ -1151,6 +1150,28 @@ enum c_tree_code {
 
 #undef DEFTREECODE
 
+#define c_common_stmt_codes                            \
+   CLEANUP_STMT,       EXPR_STMT,      COMPOUND_STMT,  \
+   DECL_STMT,          IF_STMT,        FOR_STMT,       \
+   WHILE_STMT,         DO_STMT,        RETURN_STMT,    \
+   BREAK_STMT,         CONTINUE_STMT,  SCOPE_STMT,     \
+   SWITCH_STMT,                GOTO_STMT,      LABEL_STMT,     \
+   ASM_STMT,           FILE_STMT,      CASE_LABEL
+
+/* TRUE if a code represents a statement.  The front end init
+   langhook should take care of initialization of this array.  */
+extern bool statement_code_p[MAX_TREE_CODES];
+
+#define STATEMENT_CODE_P(CODE) statement_code_p[(int) (CODE)]
+
+#define INIT_STATEMENT_CODES(STMT_CODES)                       \
+  do {                                                         \
+    unsigned int i;                                            \
+    memset (&statement_code_p, 0, sizeof (statement_code_p));  \
+    for (i = 0; i < ARRAY_SIZE (STMT_CODES); i++)              \
+      statement_code_p[STMT_CODES[i]] = true;                  \
+  } while (0)
+
 extern void genrtl_do_pushlevel                 PARAMS ((void));
 extern void genrtl_goto_stmt                    PARAMS ((tree));
 extern void genrtl_expr_stmt                    PARAMS ((tree));
@@ -1170,7 +1191,7 @@ extern void genrtl_compound_stmt                PARAMS ((tree));
 extern void genrtl_asm_stmt                     PARAMS ((tree, tree,
                                                         tree, tree,
                                                         tree, int));
-extern void genrtl_decl_cleanup                 PARAMS ((tree));
+extern void genrtl_cleanup_stmt                 PARAMS ((tree));
 extern int stmts_are_full_exprs_p               PARAMS ((void));
 extern int anon_aggr_type_p                     PARAMS ((tree));
 
@@ -1281,7 +1302,7 @@ struct c_fileinfo
 struct c_fileinfo *get_fileinfo                        PARAMS ((const char *));
 extern void dump_time_statistics               PARAMS ((void));
 
-extern int c_dump_tree                         PARAMS ((void *, tree));
+extern bool c_dump_tree                                PARAMS ((void *, tree));
 
 extern void pch_init                           PARAMS ((void));
 extern int c_common_valid_pch                  PARAMS ((cpp_reader *pfile,