/* Definitions for c-common.c.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
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,
/* 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));
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
extern int flag_preprocess_only;
+/* Nonzero means don't output line number information. */
+
+extern char flag_no_line_commands;
+
+/* Nonzero causes -E output not to be done, but directives such as
+ #define that have side effects are still obeyed. */
+
+extern char flag_no_output;
+
+/* Nonzero means dump macros in some fashion; contains the 'D', 'M' or
+ 'N' of the command line switch. */
+
+extern char flag_dump_macros;
+
+/* Nonzero means pass #include lines through to the output. */
+
+extern char flag_dump_includes;
+
/* The file name to which we should write a precompiled header, or
NULL if no header will be written in this compile. */
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;
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;
extern tree build_va_arg PARAMS ((tree, tree));
extern void c_common_init_options PARAMS ((enum c_language_kind));
-extern bool c_common_post_options PARAMS ((void));
-extern const char *c_common_init PARAMS ((const char *));
+extern bool c_common_post_options PARAMS ((const char **));
+extern bool c_common_init PARAMS ((void));
extern void c_common_finish PARAMS ((void));
extern void c_common_parse_file PARAMS ((int));
extern HOST_WIDE_INT c_common_get_alias_set PARAMS ((tree));
#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));
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));
extern int c_common_unsafe_for_reeval PARAMS ((tree));
-extern const char *init_c_lex PARAMS ((const char *));
+extern void init_c_lex PARAMS ((void));
-extern void cb_register_builtins PARAMS ((cpp_reader *));
+extern void c_cpp_builtins PARAMS ((cpp_reader *));
/* Positive if an implicit `extern "C"' scope has just been entered;
negative if such a scope has just been exited. */
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,
int fd,
const char *orig));
extern void c_common_write_pch PARAMS ((void));
+extern void builtin_define_with_value PARAMS ((const char *,
+ const char *, int));
+extern void c_stddef_cpp_builtins PARAMS ((void));
+extern void fe_file_change PARAMS ((const struct line_map *));
+
+/* In c-ppoutput.c */
+extern void init_pp_output PARAMS ((FILE *));
+extern void preprocess_file PARAMS ((cpp_reader *));
+extern void pp_file_change PARAMS ((const struct line_map *));
#endif /* ! GCC_C_COMMON_H */