OSDN Git Service

* gcse.c (insert_store): Fix typo in previous patch.
[pf3gnuchains/gcc-fork.git] / gcc / c-common.h
index d1c3e5a..6590453 100644 (file)
@@ -24,6 +24,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #include "splay-tree.h"
 #include "cpplib.h"
+#include "ggc.h"
 
 /* Usage of TREE_LANG_FLAG_?:
    0: COMPOUND_STMT_NO_SCOPE (in COMPOUND_STMT).
@@ -145,13 +146,10 @@ enum c_tree_index
     CTI_CONST_STRING_TYPE,
 
     /* Type for boolean expressions (bool in C++, int in C).  */
-    CTI_BOOLEAN_TYPE,
-    CTI_BOOLEAN_TRUE,
-    CTI_BOOLEAN_FALSE,
-    /* C99's _Bool type.  */
-    CTI_C_BOOL_TYPE,
-    CTI_C_BOOL_TRUE,
-    CTI_C_BOOL_FALSE,
+    CTI_TRUTHVALUE_TYPE,
+    CTI_TRUTHVALUE_TRUE,
+    CTI_TRUTHVALUE_FALSE,
+
     CTI_DEFAULT_FUNCTION_TYPE,
 
     CTI_G77_INTEGER_TYPE,
@@ -191,13 +189,9 @@ struct c_common_identifier GTY(())
 #define widest_integer_literal_type_node c_global_trees[CTI_WIDEST_INT_LIT_TYPE]
 #define widest_unsigned_literal_type_node c_global_trees[CTI_WIDEST_UINT_LIT_TYPE]
 
-#define boolean_type_node              c_global_trees[CTI_BOOLEAN_TYPE]
-#define boolean_true_node              c_global_trees[CTI_BOOLEAN_TRUE]
-#define boolean_false_node             c_global_trees[CTI_BOOLEAN_FALSE]
-
-#define c_bool_type_node               c_global_trees[CTI_C_BOOL_TYPE]
-#define c_bool_true_node               c_global_trees[CTI_C_BOOL_TRUE]
-#define c_bool_false_node              c_global_trees[CTI_C_BOOL_FALSE]
+#define truthvalue_type_node           c_global_trees[CTI_TRUTHVALUE_TYPE]
+#define truthvalue_true_node           c_global_trees[CTI_TRUTHVALUE_TRUE]
+#define truthvalue_false_node          c_global_trees[CTI_TRUTHVALUE_FALSE]
 
 #define char_array_type_node           c_global_trees[CTI_CHAR_ARRAY_TYPE]
 #define wchar_array_type_node          c_global_trees[CTI_WCHAR_ARRAY_TYPE]
@@ -223,6 +217,13 @@ struct c_common_identifier GTY(())
 
 extern GTY(()) tree c_global_trees[CTI_MAX];
 
+/* In a RECORD_TYPE, a sorted array of the fields of the type, not a tree for size reasons.  */
+struct sorted_fields_type GTY(())
+{
+  int len;
+  tree GTY((length ("%h.len"))) elts[1];
+};
+
 /* Mark which labels are explicitly declared.
    These may be shadowed, and may be referenced from nested functions.  */
 #define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
@@ -343,6 +344,9 @@ extern void c_finish_while_stmt_cond (tree, tree);
 
 enum sw_kind { SW_PARAM = 0, SW_LOCAL, SW_GLOBAL };
 extern void shadow_warning (enum sw_kind, const char *, tree);
+extern int field_decl_cmp (const void *, const void *);
+extern void resort_sorted_fields (void *, void *, gt_pointer_operator, 
+                                  void *);
 
 /* Extra information associated with a DECL.  Other C dialects extend
    this structure in various ways.  The C front-end only uses this
@@ -357,12 +361,8 @@ struct c_lang_decl GTY(()) {
      the approximate number of statements in this function.  There is
      no need for this number to be exact; it is only used in various
      heuristics regarding optimization.  */
-#define DECL_NUM_STMTS(NODE) \
+#define DECL_ESTIMATED_INSNS(NODE) \
   (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
-
-/* Nonzero if we can read a PCH file now.  */
-
-extern int allow_pch;
 \f
 /* Switches common to the C front ends.  */
 
@@ -565,6 +565,10 @@ extern int warn_bad_function_cast;
 
 extern int warn_traditional;
 
+/* Nonzero means warn for a declaration found after a statement.  */
+
+extern int warn_declaration_after_statement;
+
 /* Nonzero means warn for non-prototype function decls
    or non-prototyped defs without previous prototype.  */
 
@@ -739,10 +743,6 @@ extern int flag_weak;
 
 extern int flag_use_cxa_atexit;
 
-/* Nonzero means output .vtable_{entry,inherit} for use in doing vtable gc.  */
-
-extern int flag_vtable_gc;
-
 /* Nonzero means make the default pedwarns warnings instead of errors.
    The value of this flag is ignored if -pedantic is specified.  */
 
@@ -845,6 +845,11 @@ extern int max_tinst_depth;
 
 extern int skip_evaluation;
 
+/* The count of input filenames.  Only really valid for comparisons
+   against 1.  */
+
+extern unsigned num_in_fnames;
+
 /* C types are partitioned into three subsets: object, function, and
    incomplete types.  */
 #define C_TYPE_OBJECT_P(type) \
@@ -896,6 +901,8 @@ extern tree handle_format_attribute (tree *, tree, tree, int, bool *);
 extern tree handle_format_arg_attribute (tree *, tree, tree, int, bool *);
 extern void c_common_insert_default_attributes (tree);
 extern int c_common_handle_option (size_t code, const char *arg, int value);
+extern void c_common_handle_filename (const char *filename);
+extern bool c_common_missing_argument (const char *opt, size_t code);
 extern tree c_common_type_for_mode (enum machine_mode, int);
 extern tree c_common_type_for_size (unsigned int, int);
 extern tree c_common_unsigned_type (tree);
@@ -961,6 +968,14 @@ extern bool c_promoting_integer_type_p (tree);
 extern int self_promoting_args_p (tree);
 extern tree strip_array_types (tree);
 
+/* This function resets the parsers' state in preparation for parsing
+   a new file.  */
+extern void c_reset_state (void);
+/* This is the basic parsing function.  */
+extern void c_parse_file (void);
+/* This is misnamed, it actually performs end-of-compilation processing.  */
+extern void finish_file        (void);
+
 /* These macros provide convenient access to the various _STMT nodes.  */
 
 /* Nonzero if this statement should be considered a full-expression,
@@ -1291,9 +1306,11 @@ extern int c_common_valid_pch (cpp_reader *pfile, const char *name, int fd);
 extern void c_common_read_pch (cpp_reader *pfile, const char *name, int fd,
                               const char *orig);
 extern void c_common_write_pch (void);
+extern void c_common_no_more_pch (void);
 extern void builtin_define_with_value (const char *, const char *, int);
 extern void c_stddef_cpp_builtins (void);
 extern void fe_file_change (const struct line_map *);
+extern int c_estimate_num_insns (tree decl);
 
 /* In c-ppoutput.c  */
 extern void init_pp_output (FILE *);