diff options
author | Ian Lance Taylor <iant@google.com> | 2009-05-11 01:02:40 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-05-11 01:02:40 +0000 |
commit | 24b97832e7fdb1be20e493105798dac42999c34a (patch) | |
tree | 6b70d6a26b24127001f8d3a73561028aafd73246 /gcc/fortran | |
parent | 76a5dd01ebb7570ee186acf68fb7943101495536 (diff) | |
download | gcc-24b97832e7fdb1be20e493105798dac42999c34a.zip gcc-24b97832e7fdb1be20e493105798dac42999c34a.tar.gz gcc-24b97832e7fdb1be20e493105798dac42999c34a.tar.bz2 |
basic-block.h (enum profile_status): Break out of struct control_flow_graph.
./: * basic-block.h (enum profile_status): Break out of struct
control_flow_graph.
* cgraph.h (struct inline_summary): Break out of struct
cgraph_local_info.
* cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out
of struct cgraph_order_sort.
* combine.c (enum undo_kind): New enum, broken out of struct
undo.
* cse.c (struct branch_path): Break out of struct
cse_basic_block_data.
* except.h (enum eh_region_type): Break out of struct eh_region.
* gcc.c (enum add_del): Break out of struct modify_target.
* genrecog.c (enum decision_type): Break out of struct
decision_test.
* ggc-page.c (struct ggc_pch_ondisk): Break out of struct
ggc_pch_data.
* matrix-reorg.c (struct free_info): Break out of struct
matrix_info.
* regmove.c (enum match_use): New enum, broken out of struct
match.
* sched-int.h (enum post_call_group): New enum, broken out of
struct deps.
(struct deps_reg): Break out of struct deps.
* target.h (struct asm_int_op): Break out of struct gcc_target.
* tree-eh.c (struct goto_queue_node): Break out of struct
leh_tf_state.
* tree-inline.h (enum copy_body_cge_which): Break out of
copy_body_data.
* tree-pass.h (enum opt_pass_type): Break out of struct opt_pass.
* c-decl.c (in_struct, struct_types): New static variables.
(pushtag): Add loc parameter. Change all callers.
(lookup_tag): Add ploc parameter. Change all callers.
(check_compound_literal_type): New function.
(parser_xref_tag): Add loc parameter. Change all callers. If
-Wc++-compat, warn about struct/union/enum types defined within a
struct or union.
(start_struct): Add enclosing_in_struct, enclosing_struct_types,
and loc parameters. Change all callers. Change error calls to
error_at, using loc. For a redefinition, if the location of the
original definition is known, report it. Set in_struct and
struct_types. If -Wc++-compat warn if in sizeof, typeof, or
alignof.
(finish_struct): Add new parameters enclosing_in_struct and
enclosing_struct_types. Change all callers. Set
C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined
in the struct. If in a struct, add this struct to struct_types.
(start_enum): Add loc parameter. Change all callers. Use
error_at for errors, using loc. For a redefinition, if the
location of the original definition is known, report it. If in a
struct, add this enum type to struct_types. If -Wc++-compat warn
if in sizeof, typeof, or alignof.
* c-parser.c (disable_extension_diagnostics): Disable
-Wc++-compat.
(enable_extension_diagnostics): Reenable -Wc++-compat if
appropriate.
(c_parser_enum_specifier): Get enum location for start_enum.
(c_parser_struct_or_union_specifier): Get struct location for
start_struct. Save in_struct and struct_types status between
start_struct and finish_struct.
(c_parser_cast_expression): Get location of cast.
(c_parser_alignof_expression): Get location of type.
(c_parser_postfix_expression): Likewise.
(c_parser_postfix_expression_after_paren_type): Add type_loc
parameter. Change all callers. Call
check_compound_literal_type. Use type_loc for error about
variable size type.
* c-typeck.c (build_external_ref): If -Wc++-compat, warn about a
use of an enum constant from an enum type defined in a struct or
union.
(c_cast_expr): Add loc parameter. Change all callers. If
-Wc++-compat, warn about defining a type in a cast.
* c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define.
(start_enum, start_struct, finish_struct): Update declarations.
(parser_xref_tag, c_cast_expr): Update declarations.
(check_compound_literal_type): Declare.
fortran/:
* gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
gfc_omp_clauses.
(enum gfc_omp_default_sharing): Likewise.
* module.c (enum gfc_rsym_state): New enum, broken out of
pointer_info.
(enum gfc_wsym_state): Likewise.
* parse.c (enum state_order): New enum, broken out of st_state.
objc/:
* objc-act.c (objc_building_struct): New static variable.
(objc_in_struct, objc_struct_types): New static variables.
(objc_start_struct, objc_finish_struct): New static functions.
(generate_struct_by_value_array): Call objc_start_struct instead
of start_struct, and call objc_finish_struct instead of
finish_struct.
(objc_build_struct, build_objc_symtab_template): Likewise.
(build_module_descriptor): Likewise.
(build_next_objc_exception_stuff): Likewise.
(build_protocol_template): Likewise.
(build_method_prototype_list_template): Likewise.
(build_method_prototype_template): Likewise.
(build_category_template, build_selector_template): Likewise.
(build_class_template, build_super_template): Likewise.
(build_ivar_template, build_ivar_list_template): Likewise.
(build_method_list_template): Likewise.
(build_method_template): Likewise.
objcp/:
* objcp-decl.h (start_struct): Add three new, ignored, macro
parameters.
(finish_struct): Add two new, ignored, macro parameters.
testsuite/:
* gcc.dg/Wcxx-compat-7.c: New testcase.
* gcc.dg/Wcxx-compat-8.c: New testcase.
* gcc.dg/c99-tag-1.c: Recognize new "originally defined here"
notes
* gcc.dg/pr17188-1.c: Likewise.
* gcc.dg/pr39084.c: Likewise.
From-SVN: r147358
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/fortran/gfortran.h | 39 | ||||
-rw-r--r-- | gcc/fortran/module.c | 22 | ||||
-rw-r--r-- | gcc/fortran/parse.c | 17 |
4 files changed, 60 insertions, 28 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6413f11..97f56b2 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,13 @@ +2009-05-10 Ian Lance Taylor <iant@google.com> + + * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of + gfc_omp_clauses. + (enum gfc_omp_default_sharing): Likewise. + * module.c (enum gfc_rsym_state): New enum, broken out of + pointer_info. + (enum gfc_wsym_state): Likewise. + * parse.c (enum state_order): New enum, broken out of st_state. + 2009-05-10 Paul Thomas <pault@gcc.gnu.org> PR fortran/40018 diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index afd3edb..fad49c4 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -931,29 +931,34 @@ enum /* Because a symbol can belong to multiple namelists, they must be linked externally to the symbol itself. */ + +enum gfc_omp_sched_kind +{ + OMP_SCHED_NONE, + OMP_SCHED_STATIC, + OMP_SCHED_DYNAMIC, + OMP_SCHED_GUIDED, + OMP_SCHED_RUNTIME, + OMP_SCHED_AUTO +}; + +enum gfc_omp_default_sharing +{ + OMP_DEFAULT_UNKNOWN, + OMP_DEFAULT_NONE, + OMP_DEFAULT_PRIVATE, + OMP_DEFAULT_SHARED, + OMP_DEFAULT_FIRSTPRIVATE +}; + typedef struct gfc_omp_clauses { struct gfc_expr *if_expr; struct gfc_expr *num_threads; gfc_namelist *lists[OMP_LIST_NUM]; - enum - { - OMP_SCHED_NONE, - OMP_SCHED_STATIC, - OMP_SCHED_DYNAMIC, - OMP_SCHED_GUIDED, - OMP_SCHED_RUNTIME, - OMP_SCHED_AUTO - } sched_kind; + enum gfc_omp_sched_kind sched_kind; struct gfc_expr *chunk_size; - enum - { - OMP_DEFAULT_UNKNOWN, - OMP_DEFAULT_NONE, - OMP_DEFAULT_PRIVATE, - OMP_DEFAULT_SHARED, - OMP_DEFAULT_FIRSTPRIVATE - } default_sharing; + enum gfc_omp_default_sharing default_sharing; int collapse; bool nowait, ordered, untied; } diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 7f4dba5..4221c04 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -119,6 +119,20 @@ fixup_t; /* Structure for holding extra info needed for pointers being read. */ +enum gfc_rsym_state +{ + UNUSED, + NEEDED, + USED +}; + +enum gfc_wsym_state +{ + UNREFERENCED = 0, + NEEDS_WRITE, + WRITTEN +}; + typedef struct pointer_info { BBT_HEADER (pointer_info); @@ -138,9 +152,7 @@ typedef struct pointer_info { gfc_symbol *sym; char true_name[GFC_MAX_SYMBOL_LEN + 1], module[GFC_MAX_SYMBOL_LEN + 1]; - enum - { UNUSED, NEEDED, USED } - state; + enum gfc_rsym_state state; int ns, referenced, renamed; module_locus where; fixup_t *stfixup; @@ -152,9 +164,7 @@ typedef struct pointer_info struct { gfc_symbol *sym; - enum - { UNREFERENCED = 0, NEEDS_WRITE, WRITTEN } - state; + enum gfc_wsym_state state; } wsym; } diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 59296b1..d387f54 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -1580,13 +1580,20 @@ unexpected_statement (gfc_statement st) */ +enum state_order +{ + ORDER_START, + ORDER_USE, + ORDER_IMPORT, + ORDER_IMPLICIT_NONE, + ORDER_IMPLICIT, + ORDER_SPEC, + ORDER_EXEC +}; + typedef struct { - enum - { ORDER_START, ORDER_USE, ORDER_IMPORT, ORDER_IMPLICIT_NONE, - ORDER_IMPLICIT, ORDER_SPEC, ORDER_EXEC - } - state; + enum state_order state; gfc_statement last_statement; locus where; } |