Use stock GCC versions on these files.

This commit is contained in:
Alexander Kabaev 2004-07-28 03:36:15 +00:00
parent a1a81b1859
commit f246de45e2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132727
19 changed files with 23636 additions and 17498 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* Definitions for C parsing and type checking.
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.
@ -37,22 +37,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct lang_identifier GTY(())
{
struct c_common_identifier common_id;
tree global_value;
tree local_value;
tree symbol_value;
tree tag_value;
tree label_value;
tree implicit_decl;
tree error_locus;
tree limbo_value;
};
/* The resulting tree type. */
union lang_tree_node
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *)TYPE_NEXT_VARIANT (&%h.generic) : (union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
{
union tree_node GTY ((tag ("0"),
desc ("tree_node_structure (&%h)")))
union tree_node GTY ((tag ("0"),
desc ("tree_node_structure (&%h)")))
generic;
struct lang_identifier GTY ((tag ("1"))) identifier;
};
@ -61,7 +58,6 @@ union lang_tree_node
struct lang_decl GTY(())
{
struct c_lang_decl base;
/* The return types and parameter types may have variable size.
This is a list of any SAVE_EXPRs that need to be evaluated to
compute those sizes. */
@ -71,30 +67,17 @@ struct lang_decl GTY(())
/* Macros for access to language-specific slots in an identifier. */
/* Each of these slots contains a DECL node or null. */
/* This represents the value which the identifier has in the
file-scope namespace. */
#define IDENTIFIER_GLOBAL_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->global_value)
/* This represents the value which the identifier has in the current
scope. */
#define IDENTIFIER_LOCAL_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->local_value)
/* This represents the value which the identifier has as a label in
the current label scope. */
/* The value of the identifier in the namespace of "ordinary identifiers"
(data objects, enum constants, functions, typedefs). */
#define IDENTIFIER_SYMBOL_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->symbol_value)
/* The value of the identifier in the namespace of struct, union,
and enum tags. */
#define IDENTIFIER_TAG_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->tag_value)
/* The value of the identifier in the namespace of labels. */
#define IDENTIFIER_LABEL_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->label_value)
/* This records the extern decl of this identifier, if it has had one
at any point in this compilation. */
#define IDENTIFIER_LIMBO_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->limbo_value)
/* This records the implicit function decl of this identifier, if it
has had one at any point in this compilation. */
#define IDENTIFIER_IMPLICIT_DECL(NODE) \
(((struct lang_identifier *) (NODE))->implicit_decl)
/* This is the last function in which we printed an "undefined variable"
message for this identifier. Value is a FUNCTION_DECL or null. */
#define IDENTIFIER_ERROR_LOCUS(NODE) \
(((struct lang_identifier *) (NODE))->error_locus)
/* In identifiers, C uses the following fields in a special way:
TREE_PUBLIC to record that there was a previous local extern decl.
@ -111,22 +94,19 @@ struct lang_decl GTY(())
nonzero if the definition of the type has already started. */
#define C_TYPE_BEING_DEFINED(TYPE) TYPE_LANG_FLAG_0 (TYPE)
/* In an incomplete RECORD_TYPE or UNION_TYPE, a list of variable
declarations whose type would be completed by completing that type. */
#define C_TYPE_INCOMPLETE_VARS(TYPE) TYPE_VFIELD (TYPE)
/* In an IDENTIFIER_NODE, nonzero if this identifier is actually a
keyword. C_RID_CODE (node) is then the RID_* value of the keyword,
and C_RID_YYCODE is the token number wanted by Yacc. */
#define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID)
/* This function was declared inline. This flag controls the linkage
semantics of 'inline'; whether or not the function is inlined is
controlled by DECL_INLINE. */
#define DECL_DECLARED_INLINE_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->base.declared_inline)
/* In a RECORD_TYPE, a sorted array of the fields of the type. */
struct lang_type GTY(())
{
int len;
tree GTY((length ("%h.len"))) elts[1];
struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
};
/* Record whether a type or decl was written with nonconstant size.
@ -134,13 +114,6 @@ struct lang_type GTY(())
#define C_TYPE_VARIABLE_SIZE(TYPE) TYPE_LANG_FLAG_1 (TYPE)
#define C_DECL_VARIABLE_SIZE(TYPE) DECL_LANG_FLAG_0 (TYPE)
#if 0 /* Not used. */
/* Record whether a decl for a function or function pointer has
already been mentioned (in a warning) because it was called
but didn't have a prototype. */
#define C_MISSING_PROTOTYPE_WARNED(DECL) DECL_LANG_FLAG_2 (DECL)
#endif
/* Store a value in that field. */
#define C_SET_EXP_ORIGINAL_CODE(EXP, CODE) \
(TREE_COMPLEXITY (EXP) = (int) (CODE))
@ -152,103 +125,122 @@ struct lang_type GTY(())
return type. */
#define C_FUNCTION_IMPLICIT_INT(EXP) DECL_LANG_FLAG_1 (EXP)
/* Nonzero for a declaration of a built in function if there has been no
occasion that would declare the function in ordinary C.
Using the function draws a pedantic warning in this case. */
#define C_DECL_ANTICIPATED(EXP) DECL_LANG_FLAG_3 (EXP)
/* For a FUNCTION_DECL, nonzero if it was an implicit declaration. */
#define C_DECL_IMPLICIT(EXP) DECL_LANG_FLAG_2 (EXP)
/* Nonzero for a declaration of an external object which is not
currently in scope. This is either a built-in declaration of
a library function, before a real declaration has been seen,
or a declaration that appeared in an inner scope that has ended. */
#define C_DECL_INVISIBLE(EXP) DECL_LANG_FLAG_3 (EXP)
/* Nonzero for a decl which either doesn't exist or isn't a prototype.
N.B. Could be simplified if all built-in decls had complete prototypes
(but this is presently difficult because some of them need FILE*). */
#define C_DECL_ISNT_PROTOTYPE(EXP) \
(EXP == 0 \
|| (TYPE_ARG_TYPES (TREE_TYPE (EXP)) == 0 \
&& !DECL_BUILT_IN (EXP)))
/* For FUNCTION_TYPE, a hidden list of types of arguments. The same as
TYPE_ARG_TYPES for functions with prototypes, but created for functions
without prototypes. */
#define TYPE_ACTUAL_ARG_TYPES(NODE) TYPE_BINFO (NODE)
/* in c-lang.c and objc-act.c */
extern tree lookup_interface PARAMS ((tree));
extern tree is_class_name PARAMS ((tree));
extern tree objc_is_id PARAMS ((tree));
extern void objc_check_decl PARAMS ((tree));
extern void finish_file PARAMS ((void));
extern int objc_comptypes PARAMS ((tree, tree, int));
extern tree objc_message_selector PARAMS ((void));
extern tree lookup_objc_ivar PARAMS ((tree));
/* Values for the first parameter to poplevel. */
#define KEEP_NO 0
#define KEEP_YES 1
#define KEEP_MAYBE 2
/* Save and restore the variables in this file and elsewhere
that keep track of the progress of compilation of the current function.
Used for nested functions. */
struct language_function GTY(())
{
struct c_language_function base;
int returns_value;
int returns_null;
int returns_abnormally;
int warn_about_return_type;
int extern_inline;
int x_in_iteration_stmt;
int x_in_case_stmt;
};
/* in c-parse.in */
extern void c_parse_init PARAMS ((void));
extern void c_parse_init (void);
/* in c-aux-info.c */
extern void gen_aux_info_record PARAMS ((tree, int, int, int));
extern void gen_aux_info_record (tree, int, int, int);
/* in c-decl.c */
extern int global_bindings_p PARAMS ((void));
extern int kept_level_p PARAMS ((void));
extern tree getdecls PARAMS ((void));
extern void pushlevel PARAMS ((int));
extern tree poplevel PARAMS ((int,int, int));
extern void insert_block PARAMS ((tree));
extern void set_block PARAMS ((tree));
extern tree pushdecl PARAMS ((tree));
extern int c_in_iteration_stmt;
extern int c_in_case_stmt;
extern void c_insert_default_attributes PARAMS ((tree));
extern void c_init_decl_processing PARAMS ((void));
extern void c_dup_lang_specific_decl PARAMS ((tree));
extern void c_print_identifier PARAMS ((FILE *, tree, int));
extern tree build_array_declarator PARAMS ((tree, tree, int, int));
extern tree build_enumerator PARAMS ((tree, tree));
extern void check_for_loop_decls PARAMS ((void));
extern void clear_parm_order PARAMS ((void));
extern int complete_array_type PARAMS ((tree, tree, int));
extern void declare_parm_level PARAMS ((int));
extern tree define_label PARAMS ((const char *, int,
tree));
extern void finish_decl PARAMS ((tree, tree, tree));
extern tree finish_enum PARAMS ((tree, tree, tree));
extern void finish_function PARAMS ((int, int));
extern tree finish_struct PARAMS ((tree, tree, tree));
extern tree get_parm_info PARAMS ((int));
extern tree grokfield PARAMS ((const char *, int, tree, tree, tree));
extern tree groktypename PARAMS ((tree));
extern tree groktypename_in_parm_context PARAMS ((tree));
extern tree implicitly_declare PARAMS ((tree));
extern void implicit_decl_warning PARAMS ((tree));
extern int in_parm_level_p PARAMS ((void));
extern void keep_next_level PARAMS ((void));
extern tree lookup_name PARAMS ((tree));
extern tree lookup_name_current_level PARAMS ((tree));
extern void parmlist_tags_warning PARAMS ((void));
extern void pending_xref_error PARAMS ((void));
extern void c_push_function_context PARAMS ((struct function *));
extern void c_pop_function_context PARAMS ((struct function *));
extern void pop_label_level PARAMS ((void));
extern void push_label_level PARAMS ((void));
extern void push_parm_decl PARAMS ((tree));
extern tree pushdecl_top_level PARAMS ((tree));
extern void pushtag PARAMS ((tree, tree));
extern tree set_array_declarator_type PARAMS ((tree, tree, int));
extern tree shadow_label PARAMS ((tree));
extern void shadow_tag PARAMS ((tree));
extern void shadow_tag_warned PARAMS ((tree, int));
extern tree start_enum PARAMS ((tree));
extern int start_function PARAMS ((tree, tree, tree));
extern tree start_decl PARAMS ((tree, tree, int,
tree));
extern tree start_struct PARAMS ((enum tree_code, tree));
extern void store_parm_decls PARAMS ((void));
extern tree xref_tag PARAMS ((enum tree_code, tree));
extern tree c_begin_compound_stmt PARAMS ((void));
extern void c_expand_deferred_function PARAMS ((tree));
extern void c_expand_decl_stmt PARAMS ((tree));
extern tree make_pointer_declarator PARAMS ((tree, tree));
extern int global_bindings_p (void);
extern tree getdecls (void);
extern void pushlevel (int);
extern void insert_block (tree);
extern void set_block (tree);
extern tree pushdecl (tree);
extern void c_expand_body (tree);
extern void c_init_decl_processing (void);
extern void c_dup_lang_specific_decl (tree);
extern void c_print_identifier (FILE *, tree, int);
extern tree build_array_declarator (tree, tree, int, int);
extern tree build_enumerator (tree, tree);
extern void check_for_loop_decls (void);
extern void mark_forward_parm_decls (void);
extern int complete_array_type (tree, tree, int);
extern void declare_parm_level (void);
extern void undeclared_variable (tree);
extern tree declare_label (tree);
extern tree define_label (location_t, tree);
extern void finish_decl (tree, tree, tree);
extern tree finish_enum (tree, tree, tree);
extern void finish_function (void);
extern tree finish_struct (tree, tree, tree);
extern tree get_parm_info (int);
extern tree grokfield (tree, tree, tree);
extern tree groktypename (tree);
extern tree groktypename_in_parm_context (tree);
extern tree implicitly_declare (tree);
extern int in_parm_level_p (void);
extern void keep_next_level (void);
extern tree lookup_name (tree);
extern void pending_xref_error (void);
extern void c_push_function_context (struct function *);
extern void c_pop_function_context (struct function *);
extern void push_parm_decl (tree);
extern tree pushdecl_top_level (tree);
extern void pushtag (tree, tree);
extern tree set_array_declarator_type (tree, tree, int);
extern void shadow_tag (tree);
extern void shadow_tag_warned (tree, int);
extern tree start_enum (tree);
extern int start_function (tree, tree, tree);
extern tree start_decl (tree, tree, int, tree);
extern tree start_struct (enum tree_code, tree);
extern void store_parm_decls (void);
extern tree xref_tag (enum tree_code, tree);
extern tree c_begin_compound_stmt (void);
extern void c_expand_deferred_function (tree);
extern void c_expand_decl_stmt (tree);
extern void c_static_assembler_name (tree);
extern tree make_pointer_declarator (tree, tree);
extern void merge_translation_unit_decls (void);
/* in c-objc-common.c */
extern int c_disregard_inline_limits PARAMS ((tree));
extern int c_cannot_inline_tree_fn PARAMS ((tree *));
extern const char *c_objc_common_init PARAMS ((const char *));
extern int c_missing_noreturn_ok_p PARAMS ((tree));
extern void c_objc_common_finish_file PARAMS ((void));
extern int defer_fn PARAMS ((tree));
extern bool c_warn_unused_global_decl PARAMS ((tree));
extern int c_disregard_inline_limits (tree);
extern int c_cannot_inline_tree_fn (tree *);
extern bool c_objc_common_init (void);
extern int c_missing_noreturn_ok_p (tree);
extern void c_objc_common_finish_file (void);
extern int defer_fn (tree);
extern bool c_warn_unused_global_decl (tree);
#define c_build_type_variant(TYPE, CONST_P, VOLATILE_P) \
c_build_qualified_type ((TYPE), \
@ -256,47 +248,51 @@ extern bool c_warn_unused_global_decl PARAMS ((tree));
((VOLATILE_P) ? TYPE_QUAL_VOLATILE : 0))
#define c_sizeof_nowarn(T) c_sizeof_or_alignof_type (T, SIZEOF_EXPR, 0)
/* in c-typeck.c */
extern tree require_complete_type PARAMS ((tree));
extern int comptypes PARAMS ((tree, tree));
extern tree c_size_in_bytes PARAMS ((tree));
extern bool c_mark_addressable PARAMS ((tree));
extern void c_incomplete_type_error PARAMS ((tree, tree));
extern tree c_type_promotes_to PARAMS ((tree));
extern tree build_component_ref PARAMS ((tree, tree));
extern tree build_indirect_ref PARAMS ((tree, const char *));
extern tree build_array_ref PARAMS ((tree, tree));
extern tree build_external_ref PARAMS ((tree, int));
extern tree parser_build_binary_op PARAMS ((enum tree_code,
tree, tree));
extern int c_tree_expr_nonnegative_p PARAMS ((tree));
extern void readonly_warning PARAMS ((tree, const char *));
extern tree build_conditional_expr PARAMS ((tree, tree, tree));
extern tree build_compound_expr PARAMS ((tree));
extern tree c_cast_expr PARAMS ((tree, tree));
extern tree build_c_cast PARAMS ((tree, tree));
extern tree build_modify_expr PARAMS ((tree, enum tree_code,
tree));
extern void store_init_value PARAMS ((tree, tree));
extern void error_init PARAMS ((const char *));
extern void pedwarn_init PARAMS ((const char *));
extern void start_init PARAMS ((tree, tree, int));
extern void finish_init PARAMS ((void));
extern void really_start_incremental_init PARAMS ((tree));
extern void push_init_level PARAMS ((int));
extern tree pop_init_level PARAMS ((int));
extern void set_init_index PARAMS ((tree, tree));
extern void set_init_label PARAMS ((tree));
extern void process_init_element PARAMS ((tree));
extern tree build_compound_literal PARAMS ((tree, tree));
extern void pedwarn_c99 PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1;
extern tree c_start_case PARAMS ((tree));
extern void c_finish_case PARAMS ((void));
extern tree simple_asm_stmt PARAMS ((tree));
extern tree build_asm_stmt PARAMS ((tree, tree, tree,
tree, tree));
extern tree c_convert_parm_for_inlining PARAMS ((tree, tree, tree));
/* For use with comptypes. */
enum {
COMPARE_STRICT = 0
};
extern tree require_complete_type (tree);
extern int comptypes (tree, tree, int);
extern tree c_size_in_bytes (tree);
extern bool c_mark_addressable (tree);
extern void c_incomplete_type_error (tree, tree);
extern tree c_type_promotes_to (tree);
extern tree build_component_ref (tree, tree);
extern tree build_indirect_ref (tree, const char *);
extern tree build_array_ref (tree, tree);
extern tree build_external_ref (tree, int);
extern tree parser_build_binary_op (enum tree_code, tree, tree);
extern int c_tree_expr_nonnegative_p (tree);
extern void readonly_error (tree, const char *);
extern tree build_conditional_expr (tree, tree, tree);
extern tree build_compound_expr (tree);
extern tree c_cast_expr (tree, tree);
extern tree build_c_cast (tree, tree);
extern tree build_modify_expr (tree, enum tree_code, tree);
extern void store_init_value (tree, tree);
extern void error_init (const char *);
extern void pedwarn_init (const char *);
extern void start_init (tree, tree, int);
extern void finish_init (void);
extern void really_start_incremental_init (tree);
extern void push_init_level (int);
extern tree pop_init_level (int);
extern void set_init_index (tree, tree);
extern void set_init_label (tree);
extern void process_init_element (tree);
extern tree build_compound_literal (tree, tree);
extern void pedwarn_c90 (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void pedwarn_c99 (const char *, ...) ATTRIBUTE_PRINTF_1;
extern tree c_start_case (tree);
extern void c_finish_case (void);
extern tree simple_asm_stmt (tree);
extern tree build_asm_stmt (tree, tree, tree, tree, tree);
extern tree c_convert_parm_for_inlining (tree, tree, tree, int);
/* Set to 0 at beginning of a function definition, set to 1 if
a return statement that specifies a return value is seen. */
@ -318,9 +314,17 @@ extern int current_function_returns_abnormally;
extern int system_header_p;
/* In c-decl.c */
extern void c_finish_incomplete_decl PARAMS ((tree));
extern void c_finish_incomplete_decl (tree);
extern void *get_current_scope (void);
extern void objc_mark_locals_volatile (void *);
extern void c_write_global_declarations (void);
extern GTY(()) tree static_ctors;
extern GTY(()) tree static_dtors;
/* In order for the format checking to accept the C frontend
diagnostic framework extensions, you must include this file before
toplev.h, not after. */
#define GCC_DIAG_STYLE __gcc_cdiag__
#endif /* ! GCC_C_TREE_H */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

16082
contrib/gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +1,32 @@
/* Handle exceptional things in C++.
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001 Free Software Foundation, Inc.
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Michael Tiemann <tiemann@cygnus.com>
Rewritten by Mike Stump <mrs@cygnus.com>, based upon an
initial re-implementation courtesy Tad Hunt.
This file is part of GNU CC.
This file is part of GCC.
GNU CC is free software; you can redistribute it and/or modify
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
@ -36,29 +38,27 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h"
#include "tree-inline.h"
static void push_eh_cleanup PARAMS ((tree));
static tree prepare_eh_type PARAMS ((tree));
static tree build_eh_type_type PARAMS ((tree));
static tree do_begin_catch PARAMS ((void));
static int dtor_nothrow PARAMS ((tree));
static tree do_end_catch PARAMS ((tree));
static void push_eh_cleanup PARAMS ((tree));
static bool decl_is_java_type PARAMS ((tree decl, int err));
static void initialize_handler_parm PARAMS ((tree, tree));
static tree do_allocate_exception PARAMS ((tree));
static tree stabilize_throw_expr PARAMS ((tree, tree *));
static tree wrap_cleanups_r PARAMS ((tree *, int *, void *));
static int complete_ptr_ref_or_void_ptr_p PARAMS ((tree, tree));
static bool is_admissible_throw_operand PARAMS ((tree));
static int can_convert_eh PARAMS ((tree, tree));
static void check_handlers_1 PARAMS ((tree, tree));
static tree cp_protect_cleanup_actions PARAMS ((void));
static void push_eh_cleanup (tree);
static tree prepare_eh_type (tree);
static tree build_eh_type_type (tree);
static tree do_begin_catch (void);
static int dtor_nothrow (tree);
static tree do_end_catch (tree);
static bool decl_is_java_type (tree decl, int err);
static void initialize_handler_parm (tree, tree);
static tree do_allocate_exception (tree);
static tree wrap_cleanups_r (tree *, int *, void *);
static int complete_ptr_ref_or_void_ptr_p (tree, tree);
static bool is_admissible_throw_operand (tree);
static int can_convert_eh (tree, tree);
static void check_handlers_1 (tree, tree);
static tree cp_protect_cleanup_actions (void);
/* Sets up all the global eh stuff that needs to be initialized at the
start of compilation. */
void
init_exception_processing ()
init_exception_processing (void)
{
tree tmp;
@ -88,7 +88,7 @@ init_exception_processing ()
propagated out of a cleanup region. */
static tree
cp_protect_cleanup_actions ()
cp_protect_cleanup_actions (void)
{
/* [except.terminate]
@ -98,8 +98,7 @@ cp_protect_cleanup_actions ()
}
static tree
prepare_eh_type (type)
tree type;
prepare_eh_type (tree type)
{
if (type == NULL_TREE)
return type;
@ -107,8 +106,7 @@ prepare_eh_type (type)
return error_mark_node;
/* peel back references, so they match. */
if (TREE_CODE (type) == REFERENCE_TYPE)
type = TREE_TYPE (type);
type = non_reference (type);
/* Peel off cv qualifiers. */
type = TYPE_MAIN_VARIANT (type);
@ -116,12 +114,9 @@ prepare_eh_type (type)
return type;
}
/* Build the address of a typeinfo decl for use in the runtime
matching field of the exception model. */
static tree
build_eh_type_type (type)
tree type;
/* Return the type info for TYPE as used by EH machinery. */
tree
eh_type_info (tree type)
{
tree exp;
@ -133,14 +128,27 @@ build_eh_type_type (type)
else
exp = get_tinfo_decl (type);
mark_used (exp);
exp = build1 (ADDR_EXPR, ptr_type_node, exp);
return exp;
}
/* Build the address of a typeinfo decl for use in the runtime
matching field of the exception model. */
static tree
build_eh_type_type (tree type)
{
tree exp = eh_type_info (type);
if (!exp)
return NULL;
mark_used (exp);
return build1 (ADDR_EXPR, ptr_type_node, exp);
}
tree
build_exc_ptr ()
build_exc_ptr (void)
{
return build (EXC_PTR_EXPR, ptr_type_node);
}
@ -149,14 +157,12 @@ build_exc_ptr ()
exception has been handled. */
static tree
do_begin_catch ()
do_begin_catch (void)
{
tree fn;
fn = get_identifier ("__cxa_begin_catch");
if (IDENTIFIER_GLOBAL_VALUE (fn))
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
if (!get_global_value_if_present (fn, &fn))
{
/* Declare void* __cxa_begin_catch (void *). */
tree tmp = tree_cons (NULL_TREE, ptr_type_node, void_list_node);
@ -171,8 +177,7 @@ do_begin_catch ()
NULL_TREE for a ... handler) will not throw an exception. */
static int
dtor_nothrow (type)
tree type;
dtor_nothrow (tree type)
{
if (type == NULL_TREE)
return 0;
@ -187,15 +192,12 @@ dtor_nothrow (type)
for the current catch block if no others are currently using it. */
static tree
do_end_catch (type)
tree type;
do_end_catch (tree type)
{
tree fn, cleanup;
fn = get_identifier ("__cxa_end_catch");
if (IDENTIFIER_GLOBAL_VALUE (fn))
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
if (!get_global_value_if_present (fn, &fn))
{
/* Declare void __cxa_end_catch (). */
fn = push_void_library_fn (fn, void_list_node);
@ -212,8 +214,7 @@ do_end_catch (type)
/* This routine creates the cleanup for the current exception. */
static void
push_eh_cleanup (type)
tree type;
push_eh_cleanup (tree type)
{
finish_decl_cleanup (NULL_TREE, do_end_catch (type));
}
@ -222,9 +223,7 @@ push_eh_cleanup (type)
throw. */
static bool
decl_is_java_type (decl, err)
tree decl;
int err;
decl_is_java_type (tree decl, int err)
{
bool r = (TREE_CODE (decl) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE
@ -271,8 +270,7 @@ decl_is_java_type (decl, err)
__gxx_personality_(sj|v)0 in init_exception_processing - should it
be done here instead? */
void
choose_personality_routine (lang)
enum languages lang;
choose_personality_routine (enum languages lang)
{
static enum {
chose_none,
@ -297,7 +295,7 @@ choose_personality_routine (lang)
return;
case chose_none:
; /* proceed to language selection */
; /* Proceed to language selection. */
}
switch (lang)
@ -326,9 +324,7 @@ choose_personality_routine (lang)
/* Initialize the catch parameter DECL. */
static void
initialize_handler_parm (decl, exp)
tree decl;
tree exp;
initialize_handler_parm (tree decl, tree exp)
{
tree init;
tree init_type;
@ -381,8 +377,7 @@ initialize_handler_parm (decl, exp)
/* Call this to start a catch block. DECL is the catch parameter. */
tree
expand_start_catch_block (decl)
tree decl;
expand_start_catch_block (tree decl)
{
tree exp = NULL_TREE;
tree type;
@ -449,7 +444,7 @@ expand_start_catch_block (decl)
the label to jump to if this catch block didn't match. */
void
expand_end_catch_block ()
expand_end_catch_block (void)
{
if (! doing_eh (1))
return;
@ -463,7 +458,7 @@ expand_end_catch_block ()
}
tree
begin_eh_spec_block ()
begin_eh_spec_block (void)
{
tree r = build_stmt (EH_SPEC_BLOCK, NULL_TREE, NULL_TREE);
add_stmt (r);
@ -471,9 +466,7 @@ begin_eh_spec_block ()
}
void
finish_eh_spec_block (raw_raises, eh_spec_block)
tree raw_raises;
tree eh_spec_block;
finish_eh_spec_block (tree raw_raises, tree eh_spec_block)
{
tree raises;
@ -483,8 +476,13 @@ finish_eh_spec_block (raw_raises, eh_spec_block)
for (raises = NULL_TREE;
raw_raises && TREE_VALUE (raw_raises);
raw_raises = TREE_CHAIN (raw_raises))
raises = tree_cons (NULL_TREE, prepare_eh_type (TREE_VALUE (raw_raises)),
raises);
{
tree type = prepare_eh_type (TREE_VALUE (raw_raises));
tree tinfo = eh_type_info (type);
mark_used (tinfo);
raises = tree_cons (NULL_TREE, type, raises);
}
EH_SPEC_RAISES (eh_spec_block) = raises;
}
@ -492,15 +490,12 @@ finish_eh_spec_block (raw_raises, eh_spec_block)
/* Return a pointer to a buffer for an exception object of type TYPE. */
static tree
do_allocate_exception (type)
tree type;
do_allocate_exception (tree type)
{
tree fn;
fn = get_identifier ("__cxa_allocate_exception");
if (IDENTIFIER_GLOBAL_VALUE (fn))
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
if (!get_global_value_if_present (fn, &fn))
{
/* Declare void *__cxa_allocate_exception(size_t). */
tree tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
@ -511,20 +506,16 @@ do_allocate_exception (type)
NULL_TREE));
}
#if 0
/* Call __cxa_free_exception from a cleanup. This is never invoked
directly, but see the comment for stabilize_throw_expr. */
static tree
do_free_exception (ptr)
tree ptr;
do_free_exception (tree ptr)
{
tree fn;
fn = get_identifier ("__cxa_free_exception");
if (IDENTIFIER_GLOBAL_VALUE (fn))
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
if (!get_global_value_if_present (fn, &fn))
{
/* Declare void __cxa_free_exception (void *). */
fn = push_void_library_fn (fn, tree_cons (NULL_TREE, ptr_type_node,
@ -533,16 +524,13 @@ do_free_exception (ptr)
return build_function_call (fn, tree_cons (NULL_TREE, ptr, NULL_TREE));
}
#endif
/* Wrap all cleanups for TARGET_EXPRs in MUST_NOT_THROW_EXPR.
Called from build_throw via walk_tree_without_duplicates. */
static tree
wrap_cleanups_r (tp, walk_subtrees, data)
tree *tp;
int *walk_subtrees ATTRIBUTE_UNUSED;
void *data ATTRIBUTE_UNUSED;
wrap_cleanups_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
tree exp = *tp;
tree cleanup;
@ -559,7 +547,7 @@ wrap_cleanups_r (tp, walk_subtrees, data)
cleanup = TARGET_EXPR_CLEANUP (exp);
if (cleanup)
{
cleanup = build1 (MUST_NOT_THROW_EXPR, TREE_TYPE (cleanup), cleanup);
cleanup = build1 (MUST_NOT_THROW_EXPR, void_type_node, cleanup);
TARGET_EXPR_CLEANUP (exp) = cleanup;
}
@ -567,65 +555,10 @@ wrap_cleanups_r (tp, walk_subtrees, data)
return NULL_TREE;
}
/* Like stabilize_expr, but specifically for a thrown expression. When
throwing a temporary class object, we want to construct it directly into
the thrown exception, so we look past the TARGET_EXPR and stabilize the
arguments of the call instead.
The case where EXP is a call to a function returning a class is a bit of
a grey area in the standard; it's unclear whether or not it should be
allowed to throw. I'm going to say no, as that allows us to optimize
this case without worrying about deallocating the exception object if it
does. The alternatives would be either not optimizing this case, or
wrapping the initialization in a TRY_CATCH_EXPR to call do_free_exception
rather than in a MUST_NOT_THROW_EXPR, for this case only. */
static tree
stabilize_throw_expr (exp, initp)
tree exp;
tree *initp;
{
tree init_expr;
if (TREE_CODE (exp) == TARGET_EXPR
&& TREE_CODE (TARGET_EXPR_INITIAL (exp)) == AGGR_INIT_EXPR
&& flag_elide_constructors)
{
tree aggr_init = AGGR_INIT_EXPR_CHECK (TARGET_EXPR_INITIAL (exp));
tree args = TREE_OPERAND (aggr_init, 1);
tree newargs = NULL_TREE;
tree *p = &newargs;
init_expr = void_zero_node;
for (; args; args = TREE_CHAIN (args))
{
tree arg = TREE_VALUE (args);
tree arg_init_expr;
arg = stabilize_expr (arg, &arg_init_expr);
if (TREE_SIDE_EFFECTS (arg_init_expr))
init_expr = build (COMPOUND_EXPR, void_type_node, init_expr,
arg_init_expr);
*p = tree_cons (NULL_TREE, arg, NULL_TREE);
p = &TREE_CHAIN (*p);
}
TREE_OPERAND (aggr_init, 1) = newargs;
}
else
{
exp = stabilize_expr (exp, &init_expr);
}
*initp = init_expr;
return exp;
}
/* Build a throw expression. */
tree
build_throw (exp)
tree exp;
build_throw (tree exp)
{
tree fn;
@ -633,7 +566,10 @@ build_throw (exp)
return exp;
if (processing_template_decl)
return build_min (THROW_EXPR, void_type_node, exp);
{
current_function_returns_abnormally = 1;
return build_min (THROW_EXPR, void_type_node, exp);
}
if (exp == null_node)
warning ("throwing NULL, which has integral, not pointer type");
@ -650,16 +586,19 @@ build_throw (exp)
if (exp && decl_is_java_type (TREE_TYPE (exp), 1))
{
tree fn = get_identifier ("_Jv_Throw");
if (IDENTIFIER_GLOBAL_VALUE (fn))
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
if (!get_global_value_if_present (fn, &fn))
{
/* Declare void _Jv_Throw (void *). */
tree tmp = tree_cons (NULL_TREE, ptr_type_node, void_list_node);
tmp = build_function_type (ptr_type_node, tmp);
fn = push_throw_library_fn (fn, tmp);
}
else if (really_overloaded_fn (fn))
{
error ("`%D' should never be overloaded", fn);
return error_mark_node;
}
fn = OVL_CURRENT (fn);
exp = build_function_call (fn, tree_cons (NULL_TREE, exp, NULL_TREE));
}
else if (exp)
@ -669,11 +608,10 @@ build_throw (exp)
tree object, ptr;
tree tmp;
tree temp_expr, allocate_expr;
bool elided;
fn = get_identifier ("__cxa_throw");
if (IDENTIFIER_GLOBAL_VALUE (fn))
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
if (!get_global_value_if_present (fn, &fn))
{
/* The CLEANUP_TYPE is the internal type of a destructor. */
if (cleanup_type == NULL_TREE)
@ -711,11 +649,6 @@ build_throw (exp)
the call to __cxa_allocate_exception first (which doesn't
matter, since it can't throw). */
/* Pre-evaluate the thrown expression first, since if we allocated
the space first we would have to deal with cleaning it up if
evaluating this expression throws. */
exp = stabilize_throw_expr (exp, &temp_expr);
/* Allocate the space for the exception. */
allocate_expr = do_allocate_exception (TREE_TYPE (exp));
allocate_expr = get_target_expr (allocate_expr);
@ -723,6 +656,8 @@ build_throw (exp)
object = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (exp)), ptr);
object = build_indirect_ref (object, NULL);
elided = (TREE_CODE (exp) == TARGET_EXPR);
/* And initialize the exception object. */
exp = build_init (object, exp, LOOKUP_ONLYCONVERTING);
if (exp == error_mark_node)
@ -731,10 +666,36 @@ build_throw (exp)
return error_mark_node;
}
exp = build1 (MUST_NOT_THROW_EXPR, TREE_TYPE (exp), exp);
/* Pre-evaluate the thrown expression first, since if we allocated
the space first we would have to deal with cleaning it up if
evaluating this expression throws.
The case where EXP the initializer is a call to a constructor or a
function returning a class is a bit of a grey area in the
standard; it's unclear whether or not it should be allowed to
throw. We used to say no, as that allowed us to optimize this
case without worrying about deallocating the exception object if
it does. But that conflicted with expectations (PR 13944) and the
EDG compiler; now we wrap the initialization in a TRY_CATCH_EXPR
to call do_free_exception rather than in a MUST_NOT_THROW_EXPR,
for this case only.
Note that we don't check the return value from stabilize_init
because it will only return false in cases where elided is true,
and therefore we don't need to work around the failure to
preevaluate. */
temp_expr = NULL_TREE;
stabilize_init (exp, &temp_expr);
if (elided)
exp = build (TRY_CATCH_EXPR, void_type_node, exp,
do_free_exception (ptr));
else
exp = build1 (MUST_NOT_THROW_EXPR, void_type_node, exp);
/* Prepend the allocation. */
exp = build (COMPOUND_EXPR, TREE_TYPE (exp), allocate_expr, exp);
if (temp_expr != void_zero_node)
if (temp_expr)
{
/* Prepend the calculation of the throw expression. Also, force
any cleanups from the expression to be evaluated here so that
@ -778,9 +739,7 @@ build_throw (exp)
/* Rethrow current exception. */
tree fn = get_identifier ("__cxa_rethrow");
if (IDENTIFIER_GLOBAL_VALUE (fn))
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
if (!get_global_value_if_present (fn, &fn))
{
/* Declare void __cxa_rethrow (void). */
fn = push_throw_library_fn
@ -803,9 +762,7 @@ build_throw (exp)
the expr or decl from whence TYPE came, if available. */
static int
complete_ptr_ref_or_void_ptr_p (type, from)
tree type;
tree from;
complete_ptr_ref_or_void_ptr_p (tree type, tree from)
{
int is_ptr;
@ -833,8 +790,7 @@ complete_ptr_ref_or_void_ptr_p (type, from)
a type or of an abstract class type. */
static bool
is_admissible_throw_operand (expr)
tree expr;
is_admissible_throw_operand (tree expr)
{
tree type = TREE_TYPE (expr);
@ -871,8 +827,7 @@ is_admissible_throw_operand (expr)
#include "cfns.h"
int
nothrow_libfn_p (fn)
tree fn;
nothrow_libfn_p (tree fn)
{
tree id;
@ -893,13 +848,10 @@ nothrow_libfn_p (fn)
handler for type TO, as per [except.handle]. */
static int
can_convert_eh (to, from)
tree to, from;
can_convert_eh (tree to, tree from)
{
if (TREE_CODE (to) == REFERENCE_TYPE)
to = TREE_TYPE (to);
if (TREE_CODE (from) == REFERENCE_TYPE)
from = TREE_TYPE (from);
to = non_reference (to);
from = non_reference (from);
if (TREE_CODE (to) == POINTER_TYPE && TREE_CODE (from) == POINTER_TYPE)
{
@ -912,7 +864,7 @@ can_convert_eh (to, from)
if (TREE_CODE (to) == VOID_TYPE)
return 1;
/* else fall through */
/* Else fall through. */
}
if (CLASS_TYPE_P (to) && CLASS_TYPE_P (from)
@ -929,9 +881,7 @@ can_convert_eh (to, from)
for B would catch an exception of type C. */
static void
check_handlers_1 (master, handlers)
tree master;
tree handlers;
check_handlers_1 (tree master, tree handlers)
{
tree type = TREE_TYPE (master);
tree handler;
@ -940,10 +890,10 @@ check_handlers_1 (master, handlers)
if (TREE_TYPE (handler)
&& can_convert_eh (type, TREE_TYPE (handler)))
{
lineno = STMT_LINENO (handler);
input_line = STMT_LINENO (handler);
warning ("exception of type `%T' will be caught",
TREE_TYPE (handler));
lineno = STMT_LINENO (master);
input_line = STMT_LINENO (master);
warning (" by earlier handler for `%T'", type);
break;
}
@ -952,23 +902,23 @@ check_handlers_1 (master, handlers)
/* Given a chain of HANDLERs, make sure that they're OK. */
void
check_handlers (handlers)
tree handlers;
check_handlers (tree handlers)
{
tree handler;
int save_line = lineno;
int save_line = input_line;
for (handler = handlers; handler; handler = TREE_CHAIN (handler))
{
if (TREE_CHAIN (handler) == NULL_TREE)
/* No more handlers; nothing to shadow. */;
else if (TREE_TYPE (handler) == NULL_TREE)
{
lineno = STMT_LINENO (handler);
input_line = STMT_LINENO (handler);
pedwarn
("`...' handler must be the last handler for its try block");
}
else
check_handlers_1 (handler, TREE_CHAIN (handler));
}
lineno = save_line;
input_line = save_line;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
/* Compilation switch flag definitions for GCC.
Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
2003
Free Software Foundation, Inc.
This file is part of GCC.
@ -22,9 +23,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_FLAGS_H
#define GCC_FLAGS_H
/* Name of the input .c file being compiled. */
extern const char *main_input_filename;
enum debug_info_type
{
NO_DEBUG, /* Write no debug info. */
@ -41,6 +39,9 @@ enum debug_info_type
/* Specify which kind of debugging info to generate. */
extern enum debug_info_type write_symbols;
/* Names of debug_info_type, for error messages. */
extern const char *const debug_type_names[];
enum debug_info_level
{
DINFO_LEVEL_NONE, /* Write no debugging info. */
@ -54,7 +55,10 @@ extern enum debug_info_level debug_info_level;
/* Nonzero means use GNU-only extensions in the generated symbolic
debugging information. */
extern int use_gnu_debug_info_extensions;
extern bool use_gnu_debug_info_extensions;
/* Nonzero means emit debugging information only for symbols which are used. */
extern int flag_debug_only_used_symbols;
/* Nonzero means do optimizations. -opt. */
@ -69,10 +73,6 @@ extern int optimize_size;
extern int quiet_flag;
/* Print times taken by the various passes. -ftime-report. */
extern int time_report;
/* Print memory still in use at end of compilation (which may have little
to do with peak memory consumption). -fmem-report. */
@ -80,65 +80,62 @@ extern int mem_report;
/* Don't print warning messages. -w. */
extern int inhibit_warnings;
extern bool inhibit_warnings;
/* Don't suppress warnings from system headers. -Wsystem-headers. */
extern int warn_system_headers;
extern bool warn_system_headers;
/* Do print extra warnings (such as for uninitialized variables). -W. */
/* Do print extra warnings (such as for uninitialized variables).
-W/-Wextra. */
extern int extra_warnings;
extern bool extra_warnings;
/* If -Werror. */
extern bool warnings_are_errors;
/* Nonzero to warn about unused variables, functions et.al. Use
set_Wunused() to update the -Wunused-* flags that correspond to the
-Wunused option. */
extern void set_Wunused PARAMS ((int setting));
extern void set_Wunused (int setting);
extern int warn_unused_function;
extern int warn_unused_label;
extern int warn_unused_parameter;
extern int warn_unused_variable;
extern int warn_unused_value;
extern bool warn_unused_function;
extern bool warn_unused_label;
extern bool warn_unused_parameter;
extern bool warn_unused_variable;
extern bool warn_unused_value;
/* Nonzero to warn about code which is never reached. */
extern int warn_notreached;
extern bool warn_notreached;
/* Nonzero means warn if inline function is too large. */
extern int warn_inline;
extern bool warn_inline;
/* Nonzero to warn about variables used before they are initialized. */
extern int warn_uninitialized;
/* Zero if unknown pragmas are ignored
One if the compiler should warn about an unknown pragma not in
a system include file.
Greater than one if the compiler should warn for all unknown
pragmas. */
extern int warn_unknown_pragmas;
/* Nonzero means warn about all declarations which shadow others. */
extern int warn_shadow;
extern bool warn_shadow;
/* Warn if a switch on an enum, that does not have a default case,
fails to have a case for every enum value. */
extern int warn_switch;
extern bool warn_switch;
/* Warn if a switch does not have a default case. */
extern int warn_switch_default;
extern bool warn_switch_default;
/* Warn if a switch on an enum fails to have a case for every enum
value (regardless of the presence or otherwise of a default case). */
extern int warn_switch_enum;
extern bool warn_switch_enum;
/* Nonzero means warn about function definitions that default the return type
or that use a null return and have a return-type other than void. */
@ -147,47 +144,47 @@ extern int warn_return_type;
/* Warn about functions which might be candidates for attribute noreturn. */
extern int warn_missing_noreturn;
extern bool warn_missing_noreturn;
/* Nonzero means warn about pointer casts that increase the required
alignment of the target type (and might therefore lead to a crash
due to a misaligned access). */
extern int warn_cast_align;
extern bool warn_cast_align;
/* Nonzero means warn about any objects definitions whose size is larger
than N bytes. Also want about function definitions whose returned
values are larger than N bytes. The value N is in `larger_than_size'. */
extern int warn_larger_than;
extern bool warn_larger_than;
extern HOST_WIDE_INT larger_than_size;
/* Warn if a function returns an aggregate,
since there are often incompatible calling conventions for doing this. */
extern int warn_aggregate_return;
extern bool warn_aggregate_return;
/* Warn if packed attribute on struct is unnecessary and inefficient. */
extern int warn_packed;
extern bool warn_packed;
/* Warn when gcc pads a structure to an alignment boundary. */
extern int warn_padded;
extern bool warn_padded;
/* Warn when an optimization pass is disabled. */
extern int warn_disabled_optimization;
extern bool warn_disabled_optimization;
/* Nonzero means warn about uses of __attribute__((deprecated))
declarations. */
extern int warn_deprecated_decl;
extern bool warn_deprecated_decl;
/* Nonzero means warn about constructs which might not be strict
aliasing safe. */
extern int warn_strict_aliasing;
extern bool warn_strict_aliasing;
/* Nonzero if generating code to do profiling. */
@ -197,6 +194,10 @@ extern int profile_flag;
extern int profile_arc_flag;
/* Nonzero if value profile should be measured. */
extern int flag_profile_values;
/* Nonzero if generating info for gcov to calculate line test coverage. */
extern int flag_test_coverage;
@ -281,12 +282,12 @@ extern int flag_strength_reduce;
UNROLL_MODULO) or at run-time (preconditioned to be UNROLL_MODULO) are
unrolled. */
extern int flag_unroll_loops;
extern int flag_old_unroll_loops;
/* Nonzero enables loop unrolling in unroll.c. All loops are unrolled.
This is generally not a win. */
extern int flag_unroll_all_loops;
extern int flag_old_unroll_all_loops;
/* Nonzero forces all invariant computations in loops to be moved
outside the loop. */
@ -336,18 +337,6 @@ extern int flag_omit_frame_pointer;
extern int flag_no_peephole;
/* Nonzero means all references through pointers are volatile. */
extern int flag_volatile;
/* Nonzero means treat all global and extern variables as volatile. */
extern int flag_volatile_global;
/* Nonzero means treat all static variables as volatile. */
extern int flag_volatile_static;
/* Nonzero allows GCC to optimize sibling and tail recursive calls. */
extern int flag_optimize_sibling_calls;
@ -374,6 +363,11 @@ extern int flag_finite_math_only;
extern int flag_trapping_math;
/* Nonzero means disable transformations that assume default floating
point rounding behavior. */
extern int flag_rounding_math;
/* 0 means straightforward implementation of complex divide acceptable.
1 means wide ranges of inputs must work for complex divide.
2 means C99-like requirements for complex divide (not yet implemented). */
@ -427,6 +421,8 @@ extern int flag_shared_data;
extern int flag_schedule_insns;
extern int flag_schedule_insns_after_reload;
extern int flag_sched2_use_superblocks;
extern int flag_sched2_use_traces;
/* The following flags have effect only for scheduling before register
allocation:
@ -443,6 +439,20 @@ extern int flag_schedule_speculative;
extern int flag_schedule_speculative_load;
extern int flag_schedule_speculative_load_dangerous;
/* The following flags have an effect during scheduling after register
allocation:
sched_stalled_insns means that insns can be moved prematurely from the queue
of stalled insns into the ready list.
sched_stalled_insns_dep controls how many recently scheduled cycles will
be examined for a dependency on a stalled insn that is candidate for
premature removal from the queue of stalled insns into the ready list (has
an effect only if the flag 'sched_stalled_insns' is set). */
extern int flag_sched_stalled_insns;
extern int flag_sched_stalled_insns_dep;
/* flag_branch_on_count_reg means try to replace add-1,compare,branch tupple
by a cheaper branch, on a count register. */
extern int flag_branch_on_count_reg;
@ -472,16 +482,26 @@ extern int flag_pedantic_errors;
extern int flag_pic;
/* Nonzero if we are compiling position independent code for executable.
1 vs 2 for a target-dependent "small" or "large" mode. */
extern int flag_pie;
/* Nonzero if we are compiling code for a shared library, zero for
executable. */
extern int flag_shlib;
/* Nonzero means generate extra code for exception handling and enable
exception handling. */
extern int flag_exceptions;
/* Nonzero means generate frame unwind info table when supported */
/* Nonzero means generate frame unwind info table when supported. */
extern int flag_unwind_tables;
/* Nonzero means generate frame unwind info table exact at each insn boundary */
/* Nonzero means generate frame unwind info table exact at each insn boundary. */
extern int flag_asynchronous_unwind_tables;
@ -525,9 +545,9 @@ extern int flag_debug_asm;
extern int flag_dump_rtl_in_asm;
/* -fgnu-linker specifies use of the GNU linker for initializations.
-fno-gnu-linker says that collect will be used. */
extern int flag_gnu_linker;
/* Greater than zero if user symbols are prepended by a leading underscore
in generated assembly code. */
extern int flag_leading_underscore;
/* Tag all structures with __attribute__(packed) */
extern int flag_pack_struct;
@ -560,7 +580,7 @@ extern int flag_instrument_function_entry_exit;
/* Perform a peephole pass before sched2. */
extern int flag_peephole2;
/* Try to guess branch probablities. */
/* Try to guess branch probabilities. */
extern int flag_guess_branch_prob;
/* -fcheck-bounds causes gcc to generate array bounds checks.
@ -591,9 +611,15 @@ extern int frame_pointer_needed;
for PLUS / SUB / MULT. */
extern int flag_trapv;
/* Nonzero if the signed arithmetic overflow should wrap around. */
extern int flag_wrapv;
/* Nonzero if subexpressions must be evaluated from left-to-right. */
extern int flag_evaluation_order;
/* Value of the -G xx switch, and whether it was passed or not. */
extern int g_switch_value;
extern int g_switch_set;
extern unsigned HOST_WIDE_INT g_switch_value;
extern bool g_switch_set;
/* Values of the -falign-* flags: how much to align labels in code.
0 means `use default', 1 means `don't align'.
@ -633,6 +659,10 @@ extern enum graph_dump_types graph_dump_format;
extern int flag_no_ident;
/* Nonzero means perform global CSE. */
extern int flag_gcse;
/* Nonzero if we want to perform enhanced load motion during gcse. */
extern int flag_gcse_lm;
@ -641,11 +671,33 @@ extern int flag_gcse_lm;
extern int flag_gcse_sm;
/* Nonzero if we want to perform redundant load-after-store elimination
in gcse. */
extern int flag_gcse_las;
/* Nonzero if value histograms should be used to optimize code. */
extern int flag_value_profile_transformations;
/* Perform branch target register optimization before prologue / epilogue
threading. */
extern int flag_branch_target_load_optimize;
/* Perform branch target register optimization after prologue / epilogue
threading and jump2. */
extern int flag_branch_target_load_optimize2;
/* Nonzero means we should do dwarf2 duplicate elimination. */
extern int flag_eliminate_dwarf2_dups;
/* Nonzero means we should do unused type elimination. */
extern int flag_eliminate_unused_debug_types;
/* Nonzero means to collect statistics which might be expensive
and to print them when we are done. */
extern int flag_detailed_statistics;
@ -659,11 +711,40 @@ extern int flag_zero_initialized_in_bss;
/* Nonzero means disable transformations observable by signaling NaNs. */
extern int flag_signaling_nans;
extern int flag_unit_at_a_time;
extern int flag_web;
/* Nonzero means that we defer emitting functions until they are actually
used. */
extern int flag_remove_unreachable_functions;
/* A string that's used when a random name is required. NULL means
to make it really random. */
extern const char *flag_random_seed;
/* The version of the C++ ABI in use. The following values are
allowed:
0: The version of the ABI believed most conformant with the
C++ ABI specification. This ABI may change as bugs are
discovered and fixed. Therefore, 0 will not necessarily
indicate the same ABI in different versions of G++.
1: The version of the ABI first used in G++ 3.2.
Additional positive integers will be assigned as new versions of
the ABI become the default version of the ABI. */
extern int flag_abi_version;
/* Returns TRUE if generated code should match ABI version N or
greater is in use. */
#define abi_version_at_least(N) \
(flag_abi_version == 0 || flag_abi_version >= (N))
/* True if the given mode has a NaN representation and the treatment of
NaN operands is important. Certain optimizations, such as folding
x * 0 into x, are not correct for NaN operands, and are normally
@ -681,13 +762,13 @@ extern const char *flag_random_seed;
(MODE_HAS_INFINITIES (MODE) && !flag_finite_math_only)
/* Like HONOR_NANS, but true if the given mode distinguishes between
postive and negative zero, and the sign of zero is important. */
positive and negative zero, and the sign of zero is important. */
#define HONOR_SIGNED_ZEROS(MODE) \
(MODE_HAS_SIGNED_ZEROS (MODE) && !flag_unsafe_math_optimizations)
/* Like HONOR_NANS, but true if given mode supports sign-dependent rounding,
and the rounding mode is important. */
#define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \
(MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && !flag_unsafe_math_optimizations)
(MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math)
#endif /* ! GCC_FLAGS_H */

View File

@ -1,19 +1,19 @@
/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GCC.
GNU CC is free software; you can redistribute it and/or modify
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */

View File

@ -1,19 +1,19 @@
/* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GCC.
GNU CC is free software; you can redistribute it and/or modify
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@ -409,10 +409,17 @@ typedef __WINT_TYPE__ wint_t;
#ifdef _STDDEF_H
/* Offset of member MEMBER in a struct of type TYPE. */
/* Offset of member MEMBER in a struct of type TYPE. */
#ifndef __cplusplus
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#else
/* The cast to "char &" below avoids problems with user-defined
"operator &", which can appear in a POD type. */
#define offsetof(TYPE, MEMBER) \
(__offsetof__ (reinterpret_cast <size_t> \
(&reinterpret_cast <char &> \
(static_cast<TYPE *> (0)->MEMBER))))
#endif /* C++ */
#endif /* _STDDEF_H was defined this time */
#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* Prints out tree in human readable form - GNU C-compiler
/* Prints out tree in human readable form - GCC
Copyright (C) 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002 Free Software Foundation, Inc.
2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC.
@ -22,6 +22,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "real.h"
#include "ggc.h"
@ -45,23 +47,19 @@ static struct bucket **table;
down to a depth of six. */
void
debug_tree (node)
tree node;
debug_tree (tree node)
{
table = (struct bucket **) xcalloc (HASH_SIZE, sizeof (struct bucket *));
table = xcalloc (HASH_SIZE, sizeof (struct bucket *));
print_node (stderr, "", node, 0);
free (table);
table = 0;
fprintf (stderr, "\n");
putc ('\n', stderr);
}
/* Print a node in brief fashion, with just the code, address and name. */
void
print_node_brief (file, prefix, node, indent)
FILE *file;
const char *prefix;
tree node;
int indent;
print_node_brief (FILE *file, const char *prefix, tree node, int indent)
{
char class;
@ -74,8 +72,8 @@ print_node_brief (file, prefix, node, indent)
name if any. */
if (indent > 0)
fprintf (file, " ");
fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
fprintf (file, HOST_PTR_PRINTF, (char *) node);
fprintf (file, "%s <%s " HOST_PTR_PRINTF,
prefix, tree_code_name[(int) TREE_CODE (node)], (char *) node);
if (class == 'd')
{
@ -108,11 +106,8 @@ print_node_brief (file, prefix, node, indent)
fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED, TREE_INT_CST_LOW (node));
else if (TREE_INT_CST_HIGH (node) == -1
&& TREE_INT_CST_LOW (node) != 0)
{
fprintf (file, "-");
fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED,
-TREE_INT_CST_LOW (node));
}
fprintf (file, "-" HOST_WIDE_INT_PRINT_UNSIGNED,
-TREE_INT_CST_LOW (node));
else
fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
@ -141,9 +136,7 @@ print_node_brief (file, prefix, node, indent)
}
void
indent_to (file, column)
FILE *file;
int column;
indent_to (FILE *file, int column)
{
int i;
@ -158,11 +151,7 @@ indent_to (file, column)
starting in column INDENT. */
void
print_node (file, prefix, node, indent)
FILE *file;
const char *prefix;
tree node;
int indent;
print_node (FILE *file, const char *prefix, tree node, int indent)
{
int hash;
struct bucket *b;
@ -193,7 +182,7 @@ print_node (file, prefix, node, indent)
return;
}
/* It is unsafe to look at any other filds of an ERROR_MARK node. */
/* It is unsafe to look at any other fields of an ERROR_MARK node. */
if (TREE_CODE (node) == ERROR_MARK)
{
print_node_brief (file, prefix, node, indent);
@ -211,7 +200,7 @@ print_node (file, prefix, node, indent)
}
/* Add this node to the table. */
b = (struct bucket *) xmalloc (sizeof (struct bucket));
b = xmalloc (sizeof (struct bucket));
b->node = node;
b->next = table[hash];
table[hash] = b;
@ -220,8 +209,8 @@ print_node (file, prefix, node, indent)
indent_to (file, indent);
/* Print the slot this node is in, and its code, and address. */
fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
fprintf (file, HOST_PTR_PRINTF, (char *) node);
fprintf (file, "%s <%s " HOST_PTR_PRINTF,
prefix, tree_code_name[(int) TREE_CODE (node)], (void *) node);
/* Print the name, if any. */
if (class == 'd')
@ -273,7 +262,7 @@ print_node (file, prefix, node, indent)
if (TREE_USED (node))
fputs (" used", file);
if (TREE_NOTHROW (node))
fputs (" nothrow", file);
fputs (TYPE_P (node) ? " align-ok" : " nothrow", file);
if (TREE_PUBLIC (node))
fputs (" public", file);
if (TREE_PRIVATE (node))
@ -328,14 +317,10 @@ print_node (file, prefix, node, indent)
if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node))
fputs (" suppress-debug", file);
if (TREE_CODE (node) == FUNCTION_DECL && DID_INLINE_FUNC (node))
fputs (" autoinline", file);
else if (TREE_CODE (node) == FUNCTION_DECL && DECL_INLINE (node))
fputs (" inline", file);
if (TREE_CODE (node) == FUNCTION_DECL && DECL_INLINE (node))
fputs (DECL_DECLARED_INLINE_P (node) ? " inline" : " autoinline", file);
if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node))
fputs (" built-in", file);
if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN_NONANSI (node))
fputs (" built-in-nonansi", file);
if (TREE_CODE (node) == FUNCTION_DECL && DECL_NO_STATIC_CHAIN (node))
fputs (" no-static-chain", file);
@ -399,11 +384,8 @@ print_node (file, prefix, node, indent)
fprintf (file, " align %d", DECL_ALIGN (node));
if (TREE_CODE (node) == FIELD_DECL)
{
fprintf (file, " offset_align ");
fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED,
DECL_OFFSET_ALIGN (node));
}
fprintf (file, " offset_align " HOST_WIDE_INT_PRINT_UNSIGNED,
DECL_OFFSET_ALIGN (node));
}
else if (DECL_BUILT_IN (node))
{
@ -416,11 +398,8 @@ print_node (file, prefix, node, indent)
}
if (DECL_POINTER_ALIAS_SET_KNOWN_P (node))
{
fprintf (file, " alias set ");
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
DECL_POINTER_ALIAS_SET (node));
}
fprintf (file, " alias set " HOST_WIDE_INT_PRINT_DEC,
DECL_POINTER_ALIAS_SET (node));
if (TREE_CODE (node) == FIELD_DECL)
{
@ -464,8 +443,8 @@ print_node (file, prefix, node, indent)
&& DECL_SAVED_INSNS (node) != 0)
{
indent_to (file, indent + 4);
fprintf (file, "saved-insns ");
fprintf (file, HOST_PTR_PRINTF, (char *) DECL_SAVED_INSNS (node));
fprintf (file, "saved-insns " HOST_PTR_PRINTF,
(void *) DECL_SAVED_INSNS (node));
}
/* Print the decl chain only if decl is at second level. */
@ -502,9 +481,6 @@ print_node (file, prefix, node, indent)
else if (TREE_CODE (node) == ARRAY_TYPE
&& TYPE_NONALIASED_COMPONENT (node))
fputs (" nonaliased-component", file);
else if (TREE_CODE (node) == FUNCTION_TYPE
&& TYPE_AMBIENT_BOUNDEDNESS (node))
fputs (" ambient-boundedness", file);
if (TYPE_PACKED (node))
fputs (" packed", file);
@ -537,10 +513,9 @@ print_node (file, prefix, node, indent)
if (TYPE_USER_ALIGN (node))
fprintf (file, " user");
fprintf (file, " align %d", TYPE_ALIGN (node));
fprintf (file, " symtab %d", TYPE_SYMTAB_ADDRESS (node));
fprintf (file, " alias set ");
fprintf (file, HOST_WIDE_INT_PRINT_DEC, TYPE_ALIAS_SET (node));
fprintf (file, " align %d symtab %d alias set " HOST_WIDE_INT_PRINT_DEC,
TYPE_ALIGN (node), TYPE_SYMTAB_ADDRESS (node),
TYPE_ALIAS_SET (node));
print_node (file, "attributes", TYPE_ATTRIBUTES (node), indent + 4);
@ -622,7 +597,7 @@ print_node (file, prefix, node, indent)
indent_to (file, indent + 4);
fprintf (file, "rtl %d ", i);
if (TREE_OPERAND (node, i))
print_rtl (file, (struct rtx_def *) TREE_OPERAND (node, i));
print_rtl (file, (rtx) TREE_OPERAND (node, i));
else
fprintf (file, "(nil)");
fprintf (file, "\n");
@ -661,11 +636,8 @@ print_node (file, prefix, node, indent)
TREE_INT_CST_LOW (node));
else if (TREE_INT_CST_HIGH (node) == -1
&& TREE_INT_CST_LOW (node) != 0)
{
fprintf (file, "-");
fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED,
-TREE_INT_CST_LOW (node));
}
fprintf (file, "-" HOST_WIDE_INT_PRINT_UNSIGNED,
-TREE_INT_CST_LOW (node));
else
fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff