OSDN Git Service

* doc/install-old.texi: Remove more obsolete documentation.
[pf3gnuchains/gcc-fork.git] / gcc / c-common.h
index 0c2f23a..3f766a7 100644 (file)
@@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA.  */
 #define GCC_C_COMMON_H
 
 #include "splay-tree.h"
+#include "cpplib.h"
 
 /* Usage of TREE_LANG_FLAG_?:
    0: COMPOUND_STMT_NO_SCOPE (in COMPOUND_STMT).
@@ -61,7 +62,7 @@ enum rid
   RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE,
 
   /* ObjC */
-  RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
+  RID_FIRST_PQ, RID_IN = RID_FIRST_PQ, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
 
   /* C */
   RID_INT,     RID_CHAR,   RID_FLOAT,    RID_DOUBLE, RID_VOID,
@@ -147,11 +148,6 @@ enum c_tree_index
     CTI_C_BOOL_FALSE,
     CTI_DEFAULT_FUNCTION_TYPE,
 
-    CTI_VOID_FTYPE,
-    CTI_VOID_FTYPE_PTR,
-    CTI_INT_FTYPE_INT,
-    CTI_PTR_FTYPE_SIZETYPE,
-
     CTI_G77_INTEGER_TYPE,
     CTI_G77_UINTEGER_TYPE,
     CTI_G77_LONGINT_TYPE,
@@ -168,6 +164,17 @@ enum c_tree_index
     CTI_MAX
 };
 
+#define C_RID_CODE(id) (((struct c_common_identifier *) (id))->rid_code)
+
+/* Identifier part common to the C front ends.  Inherits from
+   tree_identifier, despite appearances.  */
+struct c_common_identifier
+{
+  struct tree_common common;
+  struct cpp_hashnode node;
+  ENUM_BITFIELD(rid) rid_code: CHAR_BIT;
+};
+
 #define wchar_type_node                        c_global_trees[CTI_WCHAR_TYPE]
 #define signed_wchar_type_node         c_global_trees[CTI_SIGNED_WCHAR_TYPE]
 #define unsigned_wchar_type_node       c_global_trees[CTI_UNSIGNED_WCHAR_TYPE]
@@ -195,10 +202,6 @@ enum c_tree_index
 #define const_string_type_node         c_global_trees[CTI_CONST_STRING_TYPE]
 
 #define default_function_type          c_global_trees[CTI_DEFAULT_FUNCTION_TYPE]
-#define void_ftype                     c_global_trees[CTI_VOID_FTYPE]
-#define void_ftype_ptr                 c_global_trees[CTI_VOID_FTYPE_PTR]
-#define int_ftype_int                  c_global_trees[CTI_INT_FTYPE_INT]
-#define ptr_ftype_sizetype             c_global_trees[CTI_PTR_FTYPE_SIZETYPE]
 
 /* g77 integer types, which which must be kept in sync with f/com.h */
 #define g77_integer_type_node          c_global_trees[CTI_G77_INTEGER_TYPE]
@@ -424,11 +427,6 @@ extern int flag_no_builtin;
 
 extern int flag_no_nonansi_builtin;
 
-/* If non-NULL, dump the tree structure for the entire translation
-   unit to this file.  */
-
-extern const char *flag_dump_translation_unit;
-
 /* Nonzero means warn about suggesting putting in ()'s.  */
 
 extern int warn_parentheses;
@@ -808,6 +806,20 @@ extern int c_unsafe_for_reeval                     PARAMS ((tree));
 
 /* In dump.c */
 
+/* Different tree dump places. */
+enum tree_dump_index
+{
+  TDI_all,                     /* dump the whole translation unit */
+  TDI_original,                        /* dump each function before optimizing it */
+  TDI_optimized,                       /* dump each function after optimizing it */
+  TDI_class,                   /* dump class heirarchy */
+  TDI_end
+};
+
+/* Bit masks to control tree dumping. */
+#define TDF_ADDRESS    (1 << 0)        /* dump node addresses */
+#define TDF_SLIM       (1 << 1)        /* don't go wild following links */
+
 typedef struct dump_info *dump_info_p;
 
 /* A callback function used dump language-specific parts of tree
@@ -818,7 +830,12 @@ typedef int (*dump_tree_fn) PARAMS ((dump_info_p, tree));
 
 extern dump_tree_fn lang_dump_tree;
 
-extern void dump_node_to_file                   PARAMS ((tree, const char *));
+extern int dump_flag                   PARAMS ((dump_info_p, int, tree));
+extern int dump_enabled_p              PARAMS ((enum tree_dump_index));
+extern FILE *dump_begin                        PARAMS ((enum tree_dump_index, int *));
+extern void dump_end                   PARAMS ((enum tree_dump_index, FILE *));
+extern void dump_node                  PARAMS ((tree, int, FILE *));
+extern int dump_switch_p                PARAMS ((const char *));
 
 /* Information recorded about each file examined during compilation.  */
 
@@ -832,4 +849,4 @@ struct c_fileinfo
 struct c_fileinfo *get_fileinfo                        PARAMS ((const char *));
 extern void dump_time_statistics               PARAMS ((void));
 
-#endif
+#endif /* ! GCC_C_COMMON_H */