c-aux-info.c: Convert to ISO C99.

* c-aux-info.c: Convert to ISO C99.
	* c-pragma.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-convert.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-dump.c: Likewise.
	* c-decl.c: Likewise
	* c-format.c: Likewise.
	* c-incpath.c: Likewise.
	* c-incpath.h: Likewise.

From-SVN: r68218
This commit is contained in:
Andreas Jaeger 2003-06-19 21:43:59 +02:00
parent 6dab8d4cdf
commit 35b1a6faeb
12 changed files with 744 additions and 1207 deletions

View File

@ -1,3 +1,17 @@
2003-06-19 Andreas Jaeger <aj@suse.de>
* c-aux-info.c: Convert to ISO C99.
* c-pragma.c: Likewise.
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-convert.c: Likewise.
* c-cppbuiltin.c: Likewise.
* c-dump.c: Likewise.
* c-decl.c: Likewise
* c-format.c: Likewise.
* c-incpath.c: Likewise.
* c-incpath.h: Likewise.
2003-06-19 Roger Sayle <roger@eyesopen.com>
* builtins.c (expand_errno_check): Assume that flag_errno_math
@ -11,7 +25,7 @@
the args after the main switch, and don't modify the orginal exp.
2003-06-19 Aldy Hernandez <aldyh@redhat.com>
* expr.c (const_vector_from_tree): Initialize remaining elements
to 0.
@ -143,7 +157,7 @@
Support configuring with --with-cpu=iwmmxt.
* doc/invoke.texi: Document new value for -mcpu= ARM switch.
* config/arm/aof.h (REGISTER_NAMES): Add iwmmxt register
names. Fix formatting.
names. Fix formatting.
* config/arm/aout.h (REGISTER_NAMES): Add iwmmxt register
names.
* config/arm/arm-protos.h (arm_emit_vector_const): New
@ -314,7 +328,7 @@
2003-06-17 Ranjit Mathew <rmathew@hotmail.com>
Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* doc/sourcebuild.texi (libgcj Tests): Simplify instructions on how
to run Java runtime tests separately.

View File

@ -2,7 +2,7 @@
on information stored in GCC's tree structure. This code implements the
-aux-info option.
Copyright (C) 1989, 1991, 1994, 1995, 1997, 1998,
1999, 2000 Free Software Foundation, Inc.
1999, 2000, 2003 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@segfault.us.com).
This file is part of GCC.
@ -41,12 +41,12 @@ typedef enum formals_style_enum formals_style;
static const char *data_type;
static char *affix_data_type PARAMS ((const char *)) ATTRIBUTE_MALLOC;
static const char *gen_formal_list_for_type PARAMS ((tree, formals_style));
static int deserves_ellipsis PARAMS ((tree));
static const char *gen_formal_list_for_func_def PARAMS ((tree, formals_style));
static const char *gen_type PARAMS ((const char *, tree, formals_style));
static const char *gen_decl PARAMS ((tree, int, formals_style));
static char *affix_data_type (const char *) ATTRIBUTE_MALLOC;
static const char *gen_formal_list_for_type (tree, formals_style);
static int deserves_ellipsis (tree);
static const char *gen_formal_list_for_func_def (tree, formals_style);
static const char *gen_type (const char *, tree, formals_style);
static const char *gen_decl (tree, int, formals_style);
/* Given a string representing an entire type or an entire declaration
which only lacks the actual "data-type" specifier (at its left end),
@ -63,8 +63,7 @@ static const char *gen_decl PARAMS ((tree, int, formals_style));
that look as expected. */
static char *
affix_data_type (param)
const char *param;
affix_data_type (const char *param)
{
char *const type_or_decl = ASTRDUP (param);
char *p = type_or_decl;
@ -110,9 +109,7 @@ affix_data_type (param)
of empty parens here. */
static const char *
gen_formal_list_for_type (fntype, style)
tree fntype;
formals_style style;
gen_formal_list_for_type (tree fntype, formals_style style)
{
const char *formal_list = "";
tree formal_type;
@ -194,8 +191,7 @@ gen_formal_list_for_type (fntype, style)
if the "function type" parameter list should end with an ellipsis. */
static int
deserves_ellipsis (fntype)
tree fntype;
deserves_ellipsis (tree fntype)
{
tree formal_type;
@ -230,9 +226,7 @@ deserves_ellipsis (fntype)
function formal parameter list. */
static const char *
gen_formal_list_for_func_def (fndecl, style)
tree fndecl;
formals_style style;
gen_formal_list_for_func_def (tree fndecl, formals_style style)
{
const char *formal_list = "";
tree formal_decl;
@ -305,10 +299,7 @@ gen_formal_list_for_func_def (fndecl, style)
string onto the returned "seed". */
static const char *
gen_type (ret_val, t, style)
const char *ret_val;
tree t;
formals_style style;
gen_type (const char *ret_val, tree t, formals_style style)
{
tree chain_p;
@ -434,13 +425,13 @@ gen_type (ret_val, t, style)
case TYPE_DECL:
data_type = IDENTIFIER_POINTER (DECL_NAME (t));
break;
case INTEGER_TYPE:
data_type = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (t)));
/* Normally, `unsigned' is part of the deal. Not so if it comes
with a type qualifier. */
with a type qualifier. */
if (TREE_UNSIGNED (t) && TYPE_QUALS (t))
data_type = concat ("unsigned ", data_type, NULL);
data_type = concat ("unsigned ", data_type, NULL);
break;
case REAL_TYPE:
@ -479,10 +470,7 @@ gen_type (ret_val, t, style)
an attached list of DECL nodes for function formal arguments is present. */
static const char *
gen_decl (decl, is_func_definition, style)
tree decl;
int is_func_definition;
formals_style style;
gen_decl (tree decl, int is_func_definition, formals_style style)
{
const char *ret_val;
@ -560,11 +548,8 @@ extern FILE *aux_info_file;
function definition (even the implicit ones). */
void
gen_aux_info_record (fndecl, is_definition, is_implicit, is_prototyped)
tree fndecl;
int is_definition;
int is_implicit;
int is_prototyped;
gen_aux_info_record (tree fndecl, int is_definition, int is_implicit,
int is_prototyped)
{
if (flag_gen_aux_info)
{

File diff suppressed because it is too large Load Diff

View File

@ -305,38 +305,35 @@ struct c_language_function GTY(()) {
/* Language-specific hooks. */
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 gettags PARAMS ((void));
extern void (*lang_expand_stmt) (tree);
extern void (*lang_expand_decl_stmt) (tree);
extern void (*lang_expand_function_end) (void);
extern tree gettags (void);
/* Callback that determines if it's ok for a function to have no
noreturn attribute. */
extern int (*lang_missing_noreturn_ok_p) PARAMS ((tree));
extern int (*lang_missing_noreturn_ok_p) (tree);
extern int yyparse PARAMS ((void));
extern void free_parser_stacks PARAMS ((void));
extern int yyparse (void);
extern void free_parser_stacks (void);
extern stmt_tree current_stmt_tree PARAMS ((void));
extern tree *current_scope_stmt_stack PARAMS ((void));
extern void begin_stmt_tree PARAMS ((tree *));
extern tree add_stmt PARAMS ((tree));
extern void add_decl_stmt PARAMS ((tree));
extern tree add_scope_stmt PARAMS ((int, int));
extern void finish_stmt_tree PARAMS ((tree *));
extern stmt_tree current_stmt_tree (void);
extern tree *current_scope_stmt_stack (void);
extern void begin_stmt_tree (tree *);
extern tree add_stmt (tree);
extern void add_decl_stmt (tree);
extern tree add_scope_stmt (int, int);
extern void finish_stmt_tree (tree *);
extern tree walk_stmt_tree PARAMS ((tree *,
walk_tree_fn,
void *));
extern void prep_stmt PARAMS ((tree));
extern void expand_stmt PARAMS ((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));
extern tree walk_stmt_tree (tree *, walk_tree_fn, void *);
extern void prep_stmt (tree);
extern void expand_stmt (tree);
extern tree c_begin_if_stmt (void);
extern tree c_begin_while_stmt (void);
extern void c_finish_while_stmt_cond (tree, tree);
enum sw_kind { SW_PARAM = 0, SW_LOCAL, SW_GLOBAL };
extern void shadow_warning PARAMS ((enum sw_kind,
const char *, tree));
extern void shadow_warning (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
@ -876,66 +873,62 @@ extern const struct attribute_spec c_common_format_attribute_table[];
TYPE_DEP indicates whether it depends on type of the function or not
(i.e. __PRETTY_FUNCTION__). */
extern tree (*make_fname_decl) PARAMS ((tree, int));
extern tree (*make_fname_decl) (tree, int);
extern tree identifier_global_value PARAMS ((tree));
extern void record_builtin_type PARAMS ((enum rid,
const char *, tree));
extern tree build_void_list_node PARAMS ((void));
extern void start_fname_decls PARAMS ((void));
extern void finish_fname_decls PARAMS ((void));
extern const char *fname_as_string PARAMS ((int));
extern tree fname_decl PARAMS ((unsigned, tree));
extern const char *fname_string PARAMS ((unsigned));
extern tree identifier_global_value (tree);
extern void record_builtin_type (enum rid, const char *, tree);
extern tree build_void_list_node (void);
extern void start_fname_decls (void);
extern void finish_fname_decls (void);
extern const char *fname_as_string (int);
extern tree fname_decl (unsigned, tree);
extern const char *fname_string (unsigned);
extern void check_function_arguments PARAMS ((tree, tree));
extern void check_function_arguments_recurse PARAMS ((void (*) (void *,
tree,
unsigned HOST_WIDE_INT),
void *, tree,
unsigned HOST_WIDE_INT));
extern void check_function_format PARAMS ((int *, tree, tree));
extern void set_Wformat PARAMS ((int));
extern tree handle_format_attribute PARAMS ((tree *, tree, tree,
int, bool *));
extern tree handle_format_arg_attribute PARAMS ((tree *, tree, tree,
int, bool *));
extern void c_common_insert_default_attributes PARAMS ((tree));
extern void check_function_arguments (tree, tree);
extern void check_function_arguments_recurse (void (*)
(void *, tree,
unsigned HOST_WIDE_INT),
void *, tree,
unsigned HOST_WIDE_INT);
extern void check_function_format (int *, tree, tree);
extern void set_Wformat (int);
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 tree c_common_type_for_mode PARAMS ((enum machine_mode,
int));
extern tree c_common_type_for_size PARAMS ((unsigned int, int));
extern tree c_common_unsigned_type PARAMS ((tree));
extern tree c_common_signed_type PARAMS ((tree));
extern tree c_common_signed_or_unsigned_type PARAMS ((int, tree));
extern tree c_common_truthvalue_conversion PARAMS ((tree));
extern void c_apply_type_quals_to_decl PARAMS ((int, tree));
extern tree c_sizeof_or_alignof_type PARAMS ((tree, enum tree_code, int));
extern tree c_alignof_expr PARAMS ((tree));
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);
extern tree c_common_signed_type (tree);
extern tree c_common_signed_or_unsigned_type (int, tree);
extern tree c_common_truthvalue_conversion (tree);
extern void c_apply_type_quals_to_decl (int, tree);
extern tree c_sizeof_or_alignof_type (tree, enum tree_code, int);
extern tree c_alignof_expr (tree);
/* Print an error message for invalid operands to arith operation CODE.
NOP_EXPR is used as a special case (see truthvalue_conversion). */
extern void binary_op_error PARAMS ((enum tree_code));
extern void binary_op_error (enum tree_code);
#define my_friendly_assert(EXP, N) (void) \
(((EXP) == 0) ? (fancy_abort (__FILE__, __LINE__, __FUNCTION__), 0) : 0)
extern tree c_expand_expr_stmt PARAMS ((tree));
extern void c_expand_start_cond PARAMS ((tree, int, tree));
extern void c_finish_then PARAMS ((void));
extern void c_expand_start_else PARAMS ((void));
extern void c_finish_else PARAMS ((void));
extern void c_expand_end_cond PARAMS ((void));
extern tree c_expand_expr_stmt (tree);
extern void c_expand_start_cond (tree, int, tree);
extern void c_finish_then (void);
extern void c_expand_start_else (void);
extern void c_finish_else (void);
extern void c_expand_end_cond (void);
/* Validate the expression after `case' and apply default promotions. */
extern tree check_case_value PARAMS ((tree));
extern tree fix_string_type PARAMS ((tree));
extern tree check_case_value (tree);
extern tree fix_string_type (tree);
struct varray_head_tag;
extern tree combine_strings PARAMS ((struct varray_head_tag *));
extern void constant_expression_warning PARAMS ((tree));
extern tree convert_and_check PARAMS ((tree, tree));
extern void overflow_warning PARAMS ((tree));
extern void unsigned_conversion_warning PARAMS ((tree, tree));
extern tree combine_strings (struct varray_head_tag *);
extern void constant_expression_warning (tree);
extern tree convert_and_check (tree, tree);
extern void overflow_warning (tree);
extern void unsigned_conversion_warning (tree, tree);
/* Read the rest of the current #-directive line. */
extern char *get_directive_line PARAMS ((void));
extern char *get_directive_line (void);
#define GET_DIRECTIVE_LINE() get_directive_line ()
#define c_sizeof(T) c_sizeof_or_alignof_type (T, SIZEOF_EXPR, 1)
#define c_alignof(T) c_sizeof_or_alignof_type (T, ALIGNOF_EXPR, 1)
@ -943,31 +936,31 @@ extern char *get_directive_line PARAMS ((void));
/* Subroutine of build_binary_op, used for comparison operations.
See if the operands have both been converted from subword integer types
and, if so, perhaps change them both back to their original type. */
extern tree shorten_compare PARAMS ((tree *, tree *, tree *, enum tree_code *));
extern tree shorten_compare (tree *, tree *, tree *, enum tree_code *);
extern tree pointer_int_sum PARAMS ((enum tree_code, tree, tree));
extern unsigned int min_precision PARAMS ((tree, int));
extern tree pointer_int_sum (enum tree_code, tree, tree);
extern unsigned int min_precision (tree, int);
/* Add qualifiers to a type, in the fashion for C. */
extern tree c_build_qualified_type PARAMS ((tree, int));
extern tree c_build_qualified_type (tree, int);
/* Build tree nodes and builtin functions common to both C and C++ language
frontends. */
extern void c_common_nodes_and_builtins PARAMS ((void));
extern void c_common_nodes_and_builtins (void);
extern void disable_builtin_function PARAMS ((const char *));
extern void disable_builtin_function (const char *);
extern tree build_va_arg PARAMS ((tree, tree));
extern tree build_va_arg (tree, tree);
extern int c_common_init_options PARAMS ((enum c_language_kind));
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));
extern bool c_promoting_integer_type_p PARAMS ((tree));
extern int self_promoting_args_p PARAMS ((tree));
extern tree strip_array_types PARAMS ((tree));
extern int c_common_init_options (enum c_language_kind);
extern bool c_common_post_options (const char **);
extern bool c_common_init (void);
extern void c_common_finish (void);
extern void c_common_parse_file (int);
extern HOST_WIDE_INT c_common_get_alias_set (tree);
extern bool c_promoting_integer_type_p (tree);
extern int self_promoting_args_p (tree);
extern tree strip_array_types (tree);
/* These macros provide convenient access to the various _STMT nodes. */
@ -1172,28 +1165,26 @@ extern bool statement_code_p[MAX_TREE_CODES];
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_expr_stmt_value PARAMS ((tree, int, int));
extern void genrtl_decl_stmt PARAMS ((tree));
extern void genrtl_if_stmt PARAMS ((tree));
extern void genrtl_while_stmt PARAMS ((tree));
extern void genrtl_do_stmt PARAMS ((tree));
extern void genrtl_return_stmt PARAMS ((tree));
extern void genrtl_for_stmt PARAMS ((tree));
extern void genrtl_break_stmt PARAMS ((void));
extern void genrtl_continue_stmt PARAMS ((void));
extern void genrtl_scope_stmt PARAMS ((tree));
extern void genrtl_switch_stmt PARAMS ((tree));
extern void genrtl_case_label PARAMS ((tree));
extern void genrtl_compound_stmt PARAMS ((tree));
extern void genrtl_asm_stmt PARAMS ((tree, tree,
tree, tree,
tree, int));
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 void genrtl_do_pushlevel (void);
extern void genrtl_goto_stmt (tree);
extern void genrtl_expr_stmt (tree);
extern void genrtl_expr_stmt_value (tree, int, int);
extern void genrtl_decl_stmt (tree);
extern void genrtl_if_stmt (tree);
extern void genrtl_while_stmt (tree);
extern void genrtl_do_stmt (tree);
extern void genrtl_return_stmt (tree);
extern void genrtl_for_stmt (tree);
extern void genrtl_break_stmt (void);
extern void genrtl_continue_stmt (void);
extern void genrtl_scope_stmt (tree);
extern void genrtl_switch_stmt (tree);
extern void genrtl_case_label (tree);
extern void genrtl_compound_stmt (tree);
extern void genrtl_asm_stmt (tree, tree, tree, tree, tree, int);
extern void genrtl_cleanup_stmt (tree);
extern int stmts_are_full_exprs_p (void);
extern int anon_aggr_type_p (tree);
/* For a VAR_DECL that is an anonymous union, these are the various
sub-variables that make up the anonymous union. */
@ -1211,16 +1202,16 @@ extern int anon_aggr_type_p PARAMS ((tree));
an explicit asm specification. */
#define DECL_C_HARD_REGISTER(DECL) DECL_LANG_FLAG_4 (VAR_DECL_CHECK (DECL))
extern void emit_local_var PARAMS ((tree));
extern void make_rtl_for_local_static PARAMS ((tree));
extern tree expand_cond PARAMS ((tree));
extern tree c_expand_return PARAMS ((tree));
extern tree do_case PARAMS ((tree, tree));
extern tree build_stmt PARAMS ((enum tree_code, ...));
extern tree build_case_label PARAMS ((tree, tree, tree));
extern tree build_continue_stmt PARAMS ((void));
extern tree build_break_stmt PARAMS ((void));
extern tree build_return_stmt PARAMS ((tree));
extern void emit_local_var (tree);
extern void make_rtl_for_local_static (tree);
extern tree expand_cond (tree);
extern tree c_expand_return (tree);
extern tree do_case (tree, tree);
extern tree build_stmt (enum tree_code, ...);
extern tree build_case_label (tree, tree, tree);
extern tree build_continue_stmt (void);
extern tree build_break_stmt (void);
extern tree build_return_stmt (tree);
#define COMPOUND_STMT_NO_SCOPE(NODE) TREE_LANG_FLAG_0 (NODE)
@ -1228,63 +1219,55 @@ extern tree build_return_stmt PARAMS ((tree));
initializers and cleanups. */
#define COMPOUND_STMT_BODY_BLOCK(NODE) TREE_LANG_FLAG_3 (NODE)
extern void c_expand_asm_operands PARAMS ((tree, tree, tree, tree, int, const char *, int));
extern void c_expand_asm_operands (tree, tree, tree, tree, int, const char *, int);
/* These functions must be defined by each front-end which implements
a variant of the C language. They are used in c-common.c. */
extern tree build_unary_op PARAMS ((enum tree_code,
tree, int));
extern tree build_binary_op PARAMS ((enum tree_code,
tree, tree, int));
extern int lvalue_p PARAMS ((tree));
extern tree default_conversion PARAMS ((tree));
extern tree build_unary_op (enum tree_code, tree, int);
extern tree build_binary_op (enum tree_code, tree, tree, int);
extern int lvalue_p (tree);
extern tree default_conversion (tree);
/* Given two integer or real types, return the type for their sum.
Given two compatible ANSI C types, returns the merged type. */
extern tree common_type PARAMS ((tree, tree));
extern tree common_type (tree, tree);
extern tree expand_tree_builtin PARAMS ((tree, tree, tree));
extern tree expand_tree_builtin (tree, tree, tree);
extern tree decl_constant_value PARAMS ((tree));
extern tree decl_constant_value (tree);
/* Handle increment and decrement of boolean types. */
extern tree boolean_increment PARAMS ((enum tree_code,
tree));
extern tree boolean_increment (enum tree_code, tree);
/* Hook currently used only by the C++ front end to reset internal state
after entering or leaving a header file. */
extern void extract_interface_info PARAMS ((void));
extern void extract_interface_info (void);
extern int case_compare PARAMS ((splay_tree_key,
splay_tree_key));
extern int case_compare (splay_tree_key, splay_tree_key);
extern tree c_add_case_label PARAMS ((splay_tree,
tree, tree,
tree));
extern tree c_add_case_label (splay_tree, tree, tree, tree);
extern tree build_function_call PARAMS ((tree, tree));
extern tree build_function_call (tree, tree);
extern tree finish_label_address_expr PARAMS ((tree));
extern tree finish_label_address_expr (tree);
/* Same function prototype, but the C and C++ front ends have
different implementations. Used in c-common.c. */
extern tree lookup_label PARAMS ((tree));
extern tree lookup_label (tree);
extern rtx c_expand_expr PARAMS ((tree, rtx,
enum machine_mode,
int));
extern rtx c_expand_expr (tree, rtx, enum machine_mode, int);
extern int c_safe_from_p PARAMS ((rtx, tree));
extern int c_safe_from_p (rtx, tree);
extern int c_staticp PARAMS ((tree));
extern int c_staticp (tree);
extern int c_common_unsafe_for_reeval PARAMS ((tree));
extern int c_common_unsafe_for_reeval (tree);
extern void init_c_lex PARAMS ((void));
extern void init_c_lex (void);
extern void c_cpp_builtins PARAMS ((cpp_reader *));
extern void c_cpp_builtins (cpp_reader *);
/* Positive if an implicit `extern "C"' scope has just been entered;
negative if such a scope has just been exited. */
@ -1299,28 +1282,23 @@ struct c_fileinfo
short interface_unknown;
};
struct c_fileinfo *get_fileinfo PARAMS ((const char *));
extern void dump_time_statistics PARAMS ((void));
struct c_fileinfo *get_fileinfo (const char *);
extern void dump_time_statistics (void);
extern bool c_dump_tree PARAMS ((void *, tree));
extern bool c_dump_tree (void *, tree);
extern void pch_init PARAMS ((void));
extern int c_common_valid_pch PARAMS ((cpp_reader *pfile,
const char *name,
int fd));
extern void c_common_read_pch PARAMS ((cpp_reader *pfile,
const char *name,
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 *));
extern void pch_init (void);
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 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 *);
/* 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 *));
extern void init_pp_output (FILE *);
extern void preprocess_file (cpp_reader *);
extern void pp_file_change (const struct line_map *);
#endif /* ! GCC_C_COMMON_H */

View File

@ -1,5 +1,6 @@
/* Language-level data type conversion for GNU C.
Copyright (C) 1987, 1988, 1991, 1998, 2002 Free Software Foundation, Inc.
Copyright (C) 1987, 1988, 1991, 1998, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC.
@ -62,8 +63,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
not permitted by the language being compiled. */
tree
convert (type, expr)
tree type, expr;
convert (tree type, tree expr)
{
tree e = expr;
enum tree_code code = TREE_CODE (type);

View File

@ -45,35 +45,29 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#endif
/* Non-static as some targets don't use it. */
void builtin_define_std PARAMS ((const char *)) ATTRIBUTE_UNUSED;
static void builtin_define_with_value_n PARAMS ((const char *, const char *,
size_t));
static void builtin_define_with_int_value PARAMS ((const char *,
HOST_WIDE_INT));
static void builtin_define_with_hex_fp_value PARAMS ((const char *, tree,
int, const char *,
const char *));
static void builtin_define_type_max PARAMS ((const char *, tree, int));
static void builtin_define_type_precision PARAMS ((const char *, tree));
static void builtin_define_float_constants PARAMS ((const char *,
const char *, tree));
static void define__GNUC__ PARAMS ((void));
void builtin_define_std (const char *) ATTRIBUTE_UNUSED;
static void builtin_define_with_value_n (const char *, const char *,
size_t);
static void builtin_define_with_int_value (const char *, HOST_WIDE_INT);
static void builtin_define_with_hex_fp_value (const char *, tree,
int, const char *,
const char *);
static void builtin_define_type_max (const char *, tree, int);
static void builtin_define_type_precision (const char *, tree);
static void builtin_define_float_constants (const char *, const char *,
tree);
static void define__GNUC__ (void);
/* Define NAME with value TYPE precision. */
static void
builtin_define_type_precision (name, type)
const char *name;
tree type;
builtin_define_type_precision (const char *name, tree type)
{
builtin_define_with_int_value (name, TYPE_PRECISION (type));
}
/* Define the float.h constants for TYPE using NAME_PREFIX and FP_SUFFIX. */
static void
builtin_define_float_constants (name_prefix, fp_suffix, type)
const char *name_prefix;
const char *fp_suffix;
tree type;
builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, tree type)
{
/* Used to convert radix-based values to base 10 values in several cases.
@ -107,7 +101,7 @@ builtin_define_float_constants (name_prefix, fp_suffix, type)
p radix b digits and back again without change to the q decimal digits,
p log10 b if b is a power of 10
floor((p - 1) log10 b) otherwise
floor((p - 1) log10 b) otherwise
*/
dig = (fmt->p - 1) * log10_b;
sprintf (name, "__%s_DIG__", name_prefix);
@ -166,7 +160,7 @@ builtin_define_float_constants (name_prefix, fp_suffix, type)
/* The number of decimal digits, n, such that any floating-point number
can be rounded to n decimal digits and back again without change to
the value.
the value.
p * log10(b) if b is a power of 10
ceil(1 + p * log10(b)) otherwise
@ -233,7 +227,7 @@ builtin_define_float_constants (name_prefix, fp_suffix, type)
/* For C++ std::numeric_limits<T>::has_infinity. */
sprintf (name, "__%s_HAS_INFINITY__", name_prefix);
builtin_define_with_int_value (name,
builtin_define_with_int_value (name,
MODE_HAS_INFINITIES (TYPE_MODE (type)));
/* For C++ std::numeric_limits<T>::has_quiet_NaN. We do not have a
predicate to distinguish a target that has both quiet and
@ -246,7 +240,7 @@ builtin_define_float_constants (name_prefix, fp_suffix, type)
/* Define __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__. */
static void
define__GNUC__ ()
define__GNUC__ (void)
{
/* The format of the version string, enforced below, is
([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? */
@ -289,8 +283,7 @@ define__GNUC__ ()
/* Hook that registers front end and target-specific built-ins. */
void
c_cpp_builtins (pfile)
cpp_reader *pfile;
c_cpp_builtins (cpp_reader *pfile)
{
/* -undef turns off target-specific built-ins. */
if (flag_undef)
@ -357,7 +350,7 @@ c_cpp_builtins (pfile)
cpp_define (pfile, "_LP64");
cpp_define (pfile, "__LP64__");
}
/* Other target-independent built-ins determined by command-line
options. */
if (optimize_size)
@ -410,8 +403,7 @@ c_cpp_builtins (pfile)
"unix". Passing "_mips" defines "__mips", "__mips__" and possibly
"_mips". */
void
builtin_define_std (macro)
const char *macro;
builtin_define_std (const char *macro)
{
size_t len = strlen (macro);
char *buff = alloca (len + 5);
@ -450,10 +442,7 @@ builtin_define_std (macro)
parameter says whether or not to turn the value into a string
constant. */
void
builtin_define_with_value (macro, expansion, is_str)
const char *macro;
const char *expansion;
int is_str;
builtin_define_with_value (const char *macro, const char *expansion, int is_str)
{
char *buf;
size_t mlen = strlen (macro);
@ -475,14 +464,11 @@ builtin_define_with_value (macro, expansion, is_str)
/* Pass an object-like macro and a value to define it to. The third
parameter is the length of the expansion. */
static void
builtin_define_with_value_n (macro, expansion, elen)
const char *macro;
const char *expansion;
size_t elen;
builtin_define_with_value_n (const char *macro, const char *expansion, size_t elen)
{
char *buf;
size_t mlen = strlen (macro);
/* Space for an = and a NUL. */
buf = alloca (mlen + elen + 2);
memcpy (buf, macro, mlen);
@ -495,9 +481,7 @@ builtin_define_with_value_n (macro, expansion, elen)
/* Pass an object-like macro and an integer value to define it to. */
static void
builtin_define_with_int_value (macro, value)
const char *macro;
HOST_WIDE_INT value;
builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value)
{
char *buf;
size_t mlen = strlen (macro);
@ -514,12 +498,9 @@ builtin_define_with_int_value (macro, value)
/* Pass an object-like macro a hexadecimal floating-point value. */
static void
builtin_define_with_hex_fp_value (macro, type, digits, hex_str, fp_suffix)
const char *macro;
tree type ATTRIBUTE_UNUSED;
int digits;
const char *hex_str;
const char *fp_suffix;
builtin_define_with_hex_fp_value (const char *macro,
tree type ATTRIBUTE_UNUSED, int digits,
const char *hex_str, const char *fp_suffix)
{
REAL_VALUE_TYPE real;
char dec_str[64], buf[256];
@ -530,7 +511,7 @@ builtin_define_with_hex_fp_value (macro, type, digits, hex_str, fp_suffix)
pedwarn from the preprocessor, which has no context, so we can't
suppress the warning with __extension__.
So instead what we do is construct the number in hex (because
So instead what we do is construct the number in hex (because
it's easy to get the exact correct value), parse it as a real,
then print it back out as decimal. */
@ -546,10 +527,7 @@ builtin_define_with_hex_fp_value (macro, type, digits, hex_str, fp_suffix)
unsigned types, since wchar_t might be unsigned. */
static void
builtin_define_type_max (macro, type, is_long)
const char *macro;
tree type;
int is_long;
builtin_define_type_max (const char *macro, tree type, int is_long)
{
static const char *const values[]
= { "127", "255",

File diff suppressed because it is too large Load Diff

View File

@ -30,9 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Dump information common to statements from STMT. */
void
dump_stmt (di, t)
dump_info_p di;
tree t;
dump_stmt (dump_info_p di, tree t)
{
dump_int (di, "line", STMT_LINENO (t));
}
@ -40,9 +38,7 @@ dump_stmt (di, t)
/* Dump the next statement after STMT. */
void
dump_next_stmt (di, t)
dump_info_p di;
tree t;
dump_next_stmt (dump_info_p di, tree t)
{
dump_child ("next", TREE_CHAIN (t));
}
@ -50,9 +46,7 @@ dump_next_stmt (di, t)
/* Dump any C-specific tree codes and attributes of common codes. */
bool
c_dump_tree (dump_info, t)
void *dump_info;
tree t;
c_dump_tree (void *dump_info, tree t)
{
enum tree_code code;
dump_info_p di = (dump_info_p) dump_info;

View File

@ -34,8 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Set format warning options according to a -Wformat=n option. */
void
set_Wformat (setting)
int setting;
set_Wformat (int setting)
{
warn_format = setting;
warn_format_y2k = setting;
@ -67,9 +66,8 @@ typedef struct function_format_info
unsigned HOST_WIDE_INT first_arg_num; /* number of first arg (zero for varargs) */
} function_format_info;
static bool decode_format_attr PARAMS ((tree,
function_format_info *, int));
static enum format_type decode_format_type PARAMS ((const char *));
static bool decode_format_attr (tree, function_format_info *, int);
static enum format_type decode_format_type (const char *);
static bool check_format_string (tree argument,
unsigned HOST_WIDE_INT format_num,
@ -81,12 +79,8 @@ static bool get_constant (tree expr, unsigned HOST_WIDE_INT *value,
/* Handle a "format_arg" attribute; arguments as in
struct attribute_spec.handler. */
tree
handle_format_arg_attribute (node, name, args, flags, no_add_attrs)
tree *node;
tree name ATTRIBUTE_UNUSED;
tree args;
int flags;
bool *no_add_attrs;
handle_format_arg_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
tree args, int flags, _Bool *no_add_attrs)
{
tree type = *node;
tree format_num_expr = TREE_VALUE (args);
@ -180,10 +174,7 @@ get_constant(tree expr, unsigned HOST_WIDE_INT *value, int validated_p)
successfully decoded, false otherwise. */
static bool
decode_format_attr (args, info, validated_p)
tree args;
function_format_info *info;
int validated_p;
decode_format_attr (tree args, function_format_info *info, int validated_p)
{
tree format_type_id = TREE_VALUE (args);
tree format_num_expr = TREE_VALUE (TREE_CHAIN (args));
@ -893,32 +884,30 @@ typedef struct
int *status;
} format_check_context;
static void check_format_info PARAMS ((int *, function_format_info *, tree));
static void check_format_arg PARAMS ((void *, tree, unsigned HOST_WIDE_INT));
static void check_format_info_main PARAMS ((int *, format_check_results *,
function_format_info *,
const char *, int, tree,
unsigned HOST_WIDE_INT));
static void status_warning PARAMS ((int *, const char *, ...))
static void check_format_info (int *, function_format_info *, tree);
static void check_format_arg (void *, tree, unsigned HOST_WIDE_INT);
static void check_format_info_main (int *, format_check_results *,
function_format_info *,
const char *, int, tree,
unsigned HOST_WIDE_INT);
static void status_warning (int *, const char *, ...)
ATTRIBUTE_PRINTF_2;
static void init_dollar_format_checking PARAMS ((int, tree));
static int maybe_read_dollar_number PARAMS ((int *, const char **, int,
tree, tree *,
const format_kind_info *));
static void finish_dollar_format_checking PARAMS ((int *, format_check_results *, int));
static void init_dollar_format_checking (int, tree);
static int maybe_read_dollar_number (int *, const char **, int,
tree, tree *, const format_kind_info *);
static void finish_dollar_format_checking (int *, format_check_results *, int);
static const format_flag_spec *get_flag_spec PARAMS ((const format_flag_spec *,
int, const char *));
static const format_flag_spec *get_flag_spec (const format_flag_spec *,
int, const char *);
static void check_format_types PARAMS ((int *, format_wanted_type *));
static void check_format_types (int *, format_wanted_type *);
/* Decode a format type from a string, returning the type, or
format_type_error if not valid, in which case the caller should print an
error message. */
static enum format_type
decode_format_type (s)
const char *s;
decode_format_type (const char *s)
{
int i;
int slen;
@ -945,10 +934,7 @@ decode_format_type (s)
attribute themselves. */
void
check_function_format (status, attrs, params)
int *status;
tree attrs;
tree params;
check_function_format (int *status, tree attrs, tree params)
{
tree a;
@ -1041,9 +1027,7 @@ static int dollar_format_warned;
function; PARAMS is the list of arguments starting at this argument. */
static void
init_dollar_format_checking (first_arg_num, params)
int first_arg_num;
tree params;
init_dollar_format_checking (int first_arg_num, tree params)
{
tree oparams = params;
@ -1098,14 +1082,9 @@ init_dollar_format_checking (first_arg_num, params)
a $ format is found, *FORMAT is updated to point just after it. */
static int
maybe_read_dollar_number (status, format, dollar_needed, params, param_ptr,
fki)
int *status;
const char **format;
int dollar_needed;
tree params;
tree *param_ptr;
const format_kind_info *fki;
maybe_read_dollar_number (int *status, const char **format,
int dollar_needed, tree params, tree *param_ptr,
const format_kind_info *fki)
{
int argnum;
int overflow_flag;
@ -1210,10 +1189,7 @@ maybe_read_dollar_number (status, format, dollar_needed, params, param_ptr,
pointers. */
static void
finish_dollar_format_checking (status, res, pointer_gap_ok)
int *status;
format_check_results *res;
int pointer_gap_ok;
finish_dollar_format_checking (int *status, format_check_results *res, int pointer_gap_ok)
{
int i;
bool found_pointer_gap = false;
@ -1248,10 +1224,7 @@ finish_dollar_format_checking (status, res, pointer_gap_ok)
of these is found, it is returned, otherwise NULL is returned. */
static const format_flag_spec *
get_flag_spec (spec, flag, predicates)
const format_flag_spec *spec;
int flag;
const char *predicates;
get_flag_spec (const format_flag_spec *spec, int flag, const char *predicates)
{
int i;
for (i = 0; spec[i].flag_char != 0; i++)
@ -1279,10 +1252,7 @@ get_flag_spec (spec, flag, predicates)
PARAMS is the list of argument values. */
static void
check_format_info (status, info, params)
int *status;
function_format_info *info;
tree params;
check_format_info (int *status, function_format_info *info, tree params)
{
format_check_context format_ctx;
unsigned HOST_WIDE_INT arg_num;
@ -1380,10 +1350,8 @@ check_format_info (status, info, params)
format_check_context. */
static void
check_format_arg (ctx, format_tree, arg_num)
void *ctx;
tree format_tree;
unsigned HOST_WIDE_INT arg_num;
check_format_arg (void *ctx, tree format_tree,
unsigned HOST_WIDE_INT arg_num)
{
format_check_context *format_ctx = ctx;
format_check_results *res = format_ctx->res;
@ -1539,15 +1507,10 @@ check_format_arg (ctx, format_tree, arg_num)
argument in the list of arguments. */
static void
check_format_info_main (status, res, info, format_chars, format_length,
params, arg_num)
int *status;
format_check_results *res;
function_format_info *info;
const char *format_chars;
int format_length;
tree params;
unsigned HOST_WIDE_INT arg_num;
check_format_info_main (int *status, format_check_results *res,
function_format_info *info, const char *format_chars,
int format_length, tree params,
unsigned HOST_WIDE_INT arg_num)
{
const char *orig_format_chars = format_chars;
tree first_fillin_param = params;
@ -2170,9 +2133,7 @@ check_format_info_main (status, res, info, format_chars, format_length,
/* Check the argument types from a single format conversion (possibly
including width and precision arguments). */
static void
check_format_types (status, types)
int *status;
format_wanted_type *types;
check_format_types (int *status, format_wanted_type *types)
{
for (; types != 0; types = types->next)
{
@ -2433,12 +2394,8 @@ init_dynamic_asm_fprintf_info (void)
/* Handle a "format" attribute; arguments as in
struct attribute_spec.handler. */
tree
handle_format_attribute (node, name, args, flags, no_add_attrs)
tree *node;
tree name ATTRIBUTE_UNUSED;
tree args;
int flags;
bool *no_add_attrs;
handle_format_attribute (tree *node, tree name ATTRIBUTE_UNUSED, tree args,
int flags, _Bool *no_add_attrs)
{
tree type = *node;
function_format_info info;

View File

@ -43,13 +43,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define INO_T_COPY(DEST, SRC) (DEST) = (SRC)
#endif
static void add_env_var_paths PARAMS ((const char *, int));
static void add_standard_paths PARAMS ((const char *, const char *, int));
static void free_path PARAMS ((struct cpp_path *, int));
static void merge_include_chains PARAMS ((cpp_reader *, int));
static struct cpp_path *
remove_duplicates PARAMS ((cpp_reader *, struct cpp_path *,
struct cpp_path *, struct cpp_path *, int));
static void add_env_var_paths (const char *, int);
static void add_standard_paths (const char *, const char *, int);
static void free_path (struct cpp_path *, int);
static void merge_include_chains (cpp_reader *, int);
static struct cpp_path *remove_duplicates (cpp_reader *, struct cpp_path *,
struct cpp_path *,
struct cpp_path *, int);
/* Include chains heads and tails. */
static struct cpp_path *heads[4];
@ -59,9 +59,7 @@ enum { REASON_QUIET = 0, REASON_NOENT, REASON_DUP, REASON_DUP_SYS };
/* Free an element of the include chain, possibly giving a reason. */
static void
free_path (path, reason)
struct cpp_path *path;
int reason;
free_path (struct cpp_path *path, int reason)
{
switch (reason)
{
@ -90,9 +88,7 @@ free_path (path, reason)
/* Read ENV_VAR for a PATH_SEPARATOR-separated list of file names; and
append all the names to the search path CHAIN. */
static void
add_env_var_paths (env_var, chain)
const char *env_var;
int chain;
add_env_var_paths (const char *env_var, int chain)
{
char *p, *q, *path;
@ -122,9 +118,7 @@ add_env_var_paths (env_var, chain)
/* Append the standard include chain defined in cppdefault.c. */
static void
add_standard_paths (sysroot, iprefix, cxx_stdinc)
const char *sysroot, *iprefix;
int cxx_stdinc;
add_standard_paths (const char *sysroot, const char *iprefix, int cxx_stdinc)
{
const struct default_include *p;
size_t len;
@ -176,12 +170,9 @@ add_standard_paths (sysroot, iprefix, cxx_stdinc)
removed. Return the head of the resulting chain. Any of HEAD,
JOIN and SYSTEM can be NULL. */
static struct cpp_path *
remove_duplicates (pfile, head, system, join, verbose)
cpp_reader *pfile;
struct cpp_path *head;
struct cpp_path *system;
struct cpp_path *join;
int verbose;
remove_duplicates (cpp_reader *pfile, struct cpp_path *head,
struct cpp_path *system, struct cpp_path *join,
int verbose)
{
struct cpp_path **pcur, *tmp, *cur;
struct stat st;
@ -255,9 +246,7 @@ remove_duplicates (pfile, head, system, join, verbose)
to treat -Ibar -Ifoo -I- -Ifoo -Iquux as if written -Ibar -I- -Ifoo
-Iquux. */
static void
merge_include_chains (pfile, verbose)
cpp_reader *pfile;
int verbose;
merge_include_chains (cpp_reader *pfile, int verbose)
{
/* Join the SYSTEM and AFTER chains. Remove duplicates in the
resulting SYSTEM chain. */
@ -300,7 +289,7 @@ merge_include_chains (pfile, verbose)
(Note that -I. -I- is not the same as the default setup; -I. uses
the compiler's working dir.) */
void
split_quote_chain ()
split_quote_chain (void)
{
heads[QUOTE] = heads[BRACKET];
tails[QUOTE] = tails[BRACKET];
@ -313,10 +302,7 @@ split_quote_chain ()
/* Add PATH to the include chain CHAIN. PATH must be malloc-ed and
NUL-terminated. */
void
add_path (path, chain, cxx_aware)
char *path;
int chain;
int cxx_aware;
add_path (char *path, int chain, int cxx_aware)
{
struct cpp_path *p;
@ -338,11 +324,9 @@ add_path (path, chain, cxx_aware)
/* Exported function to handle include chain merging, duplicate
removal, and registration with cpplib. */
void
register_include_chains (pfile, sysroot, iprefix,
stdinc, cxx_stdinc, verbose)
cpp_reader *pfile;
const char *sysroot, *iprefix;
int stdinc, cxx_stdinc, verbose;
register_include_chains (cpp_reader *pfile, const char *sysroot,
const char *iprefix, int stdinc, int cxx_stdinc,
int verbose)
{
static const char *const lang_env_vars[] =
{ "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH",

View File

@ -15,9 +15,9 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern void split_quote_chain PARAMS ((void));
extern void add_path PARAMS ((char *, int, int));
extern void register_include_chains PARAMS ((cpp_reader *, const char *,
const char *, int, int, int));
extern void split_quote_chain (void);
extern void add_path (char *, int, int);
extern void register_include_chains (cpp_reader *, const char *,
const char *, int, int, int);
enum { QUOTE = 0, BRACKET, SYSTEM, AFTER };

View File

@ -49,7 +49,7 @@ typedef struct align_stack GTY(())
static GTY(()) struct align_stack * alignment_stack;
#ifdef HANDLE_PRAGMA_PACK
static void handle_pragma_pack PARAMS ((cpp_reader *));
static void handle_pragma_pack (cpp_reader *);
#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
/* If we have a "global" #pragma pack(<n>) in effect when the first
@ -61,14 +61,12 @@ static int default_alignment;
#define SET_GLOBAL_ALIGNMENT(ALIGN) \
(default_alignment = maximum_field_alignment = (ALIGN))
static void push_alignment PARAMS ((int, tree));
static void pop_alignment PARAMS ((tree));
static void push_alignment (int, tree);
static void pop_alignment (tree);
/* Push an alignment value onto the stack. */
static void
push_alignment (alignment, id)
int alignment;
tree id;
push_alignment (int alignment, tree id)
{
if (alignment_stack == NULL
|| alignment_stack->alignment != alignment
@ -99,8 +97,7 @@ push_alignment (alignment, id)
/* Undo a push of an alignment onto the stack. */
static void
pop_alignment (id)
tree id;
pop_alignment (tree id)
{
align_stack * entry;
@ -157,8 +154,7 @@ pop_alignment (id)
#pragma pack (pop)
#pragma pack (pop, ID) */
static void
handle_pragma_pack (dummy)
cpp_reader *dummy ATTRIBUTE_UNUSED;
handle_pragma_pack (cpp_reader *dummy ATTRIBUTE_UNUSED)
{
tree x, id = 0;
int align = -1;
@ -261,12 +257,11 @@ handle_pragma_pack (dummy)
static GTY(()) tree pending_weaks;
#ifdef HANDLE_PRAGMA_WEAK
static void apply_pragma_weak PARAMS ((tree, tree));
static void handle_pragma_weak PARAMS ((cpp_reader *));
static void apply_pragma_weak (tree, tree);
static void handle_pragma_weak (cpp_reader *);
static void
apply_pragma_weak (decl, value)
tree decl, value;
apply_pragma_weak (tree decl, tree value)
{
if (value)
{
@ -285,8 +280,7 @@ apply_pragma_weak (decl, value)
}
void
maybe_apply_pragma_weak (decl)
tree decl;
maybe_apply_pragma_weak (tree decl)
{
tree *p, t, id;
@ -311,8 +305,7 @@ maybe_apply_pragma_weak (decl)
/* #pragma weak name [= value] */
static void
handle_pragma_weak (dummy)
cpp_reader *dummy ATTRIBUTE_UNUSED;
handle_pragma_weak (cpp_reader *dummy ATTRIBUTE_UNUSED)
{
tree name, value, x, decl;
enum cpp_ttype t;
@ -343,8 +336,7 @@ handle_pragma_weak (dummy)
}
#else
void
maybe_apply_pragma_weak (decl)
tree decl ATTRIBUTE_UNUSED;
maybe_apply_pragma_weak (tree decl ATTRIBUTE_UNUSED)
{
}
#endif /* HANDLE_PRAGMA_WEAK */
@ -352,12 +344,11 @@ maybe_apply_pragma_weak (decl)
static GTY(()) tree pending_redefine_extname;
#ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME
static void handle_pragma_redefine_extname PARAMS ((cpp_reader *));
static void handle_pragma_redefine_extname (cpp_reader *);
/* #pragma redefined_extname oldname newname */
static void
handle_pragma_redefine_extname (dummy)
cpp_reader *dummy ATTRIBUTE_UNUSED;
handle_pragma_redefine_extname (cpp_reader *dummy ATTRIBUTE_UNUSED)
{
tree oldname, newname, decl, x;
enum cpp_ttype t;
@ -390,8 +381,7 @@ handle_pragma_redefine_extname (dummy)
#endif
void
add_to_renaming_pragma_list (oldname, newname)
tree oldname, newname;
add_to_renaming_pragma_list (tree oldname, tree newname)
{
pending_redefine_extname
= tree_cons (oldname, newname, pending_redefine_extname);
@ -400,12 +390,11 @@ add_to_renaming_pragma_list (oldname, newname)
static GTY(()) tree pragma_extern_prefix;
#ifdef HANDLE_PRAGMA_EXTERN_PREFIX
static void handle_pragma_extern_prefix PARAMS ((cpp_reader *));
static void handle_pragma_extern_prefix (cpp_reader *);
/* #pragma extern_prefix "prefix" */
static void
handle_pragma_extern_prefix (dummy)
cpp_reader *dummy ATTRIBUTE_UNUSED;
handle_pragma_extern_prefix (cpp_reader *dummy ATTRIBUTE_UNUSED)
{
tree prefix, x;
enum cpp_ttype t;
@ -428,8 +417,7 @@ handle_pragma_extern_prefix (dummy)
pragmas that rename variables. */
tree
maybe_apply_renaming_pragma (decl, asmname)
tree decl, asmname;
maybe_apply_renaming_pragma (tree decl, tree asmname)
{
tree oldname;
@ -486,17 +474,15 @@ maybe_apply_renaming_pragma (decl, asmname)
/* Front-end wrapper for pragma registration to avoid dragging
cpplib.h in almost everywhere. */
void
c_register_pragma (space, name, handler)
const char *space;
const char *name;
void (*handler) PARAMS ((struct cpp_reader *));
c_register_pragma (const char *space, const char *name,
void (*handler) (struct cpp_reader *))
{
cpp_register_pragma (parse_in, space, name, handler);
}
/* Set up front-end pragmas. */
void
init_pragma ()
init_pragma (void)
{
#ifdef HANDLE_PRAGMA_PACK
c_register_pragma (0, "pack", handle_pragma_pack);