diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-08-22 22:01:22 +0200 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-08-22 22:01:22 +0200 |
commit | f8d0aee5c105df1c5d073a9a91fb467cd603f600 (patch) | |
tree | d8756e9d59b2bfdd8c7bea29dc44580fc4330896 /gcc/fortran/trans-decl.c | |
parent | 44e91562edc08fc064375d7e39b6ab704e89da1b (diff) | |
download | gcc-f8d0aee5c105df1c5d073a9a91fb467cd603f600.zip gcc-f8d0aee5c105df1c5d073a9a91fb467cd603f600.tar.gz gcc-f8d0aee5c105df1c5d073a9a91fb467cd603f600.tar.bz2 |
* trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
From-SVN: r86385
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 9dfcc18..3449663 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -238,7 +238,7 @@ gfc_get_label_decl (gfc_st_label * lp) label_decl = gfc_build_label_decl (get_identifier (label_name)); /* Tell the debugger where the label came from. */ - if (lp->value <= MAX_LABEL_VALUE) /* An internal label */ + if (lp->value <= MAX_LABEL_VALUE) /* An internal label. */ { DECL_SOURCE_LINE (label_decl) = lp->where.lb->linenum; DECL_SOURCE_FILE (label_decl) = lp->where.lb->file->filename; @@ -258,6 +258,7 @@ gfc_get_label_decl (gfc_st_label * lp) static tree gfc_sym_identifier (gfc_symbol * sym) { + return (get_identifier (sym->name)); } @@ -375,7 +376,7 @@ gfc_finish_decl (tree decl, tree init) static void gfc_finish_var_decl (tree decl, gfc_symbol * sym) { - /* TREE_ADDRESSABLE means the address of this variable is acualy needed. + /* TREE_ADDRESSABLE means the address of this variable is actually needed. This is the equivalent of the TARGET variables. We also need to set this if the variable is passed by reference in a CALL statement. */ @@ -427,6 +428,7 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym) void gfc_allocate_lang_decl (tree decl) { + DECL_LANG_SPECIFIC (decl) = (struct lang_decl *) ggc_alloc_cleared (sizeof (struct lang_decl)); } @@ -555,7 +557,7 @@ gfc_build_dummy_array_decl (gfc_symbol * sym, tree dummy) assert (TREE_CODE (dummy) == PARM_DECL && POINTER_TYPE_P (type)); - /* Do we know the element size. */ + /* Do we know the element size? */ known_size = sym->ts.type != BT_CHARACTER || INTEGER_CST_P (sym->ts.cl->backend_decl); @@ -758,7 +760,7 @@ gfc_get_symbol_decl (gfc_symbol * sym) /* Create the decl for the variable. */ decl = build_decl (VAR_DECL, gfc_sym_identifier (sym), gfc_sym_type (sym)); - /* Symbols from modules have its assembler name should be mangled. + /* Symbols from modules should have their assembler names mangled. This is done here rather than in gfc_finish_var_decl because it is different for string length variables. */ if (sym->module[0]) @@ -931,13 +933,13 @@ gfc_get_extern_function_decl (gfc_symbol * sym) } else { - /* Global declaration, eg. intrinsic subroutine. */ + /* Global declaration, e.g. intrinsic subroutine. */ DECL_CONTEXT (fndecl) = NULL_TREE; } DECL_EXTERNAL (fndecl) = 1; - /* This specifies if a function is globaly addressable, ie. it is + /* This specifies if a function is globally addressable, i.e. it is the opposite of declaring static in C. */ TREE_PUBLIC (fndecl) = 1; @@ -991,7 +993,7 @@ build_function_decl (gfc_symbol * sym) SET_DECL_ASSEMBLER_NAME (fndecl, gfc_sym_mangled_function_id (sym)); /* Figure out the return type of the declared function, and build a - RESULT_DECL for it. If this is subroutine with alternate + RESULT_DECL for it. If this is a subroutine with alternate returns, build a RESULT_DECL for it. */ attr = sym->attr; @@ -1035,7 +1037,7 @@ build_function_decl (gfc_symbol * sym) DECL_RESULT (fndecl) = result_decl; /* Don't call layout_decl for a RESULT_DECL. - layout_decl (result_decl, 0); */ + layout_decl (result_decl, 0); */ /* If the return type is a pointer, avoid alias issues by setting DECL_IS_MALLOC to nonzero. This means that the function should be @@ -1048,7 +1050,7 @@ build_function_decl (gfc_symbol * sym) DECL_CONTEXT (fndecl) = current_function_decl; DECL_EXTERNAL (fndecl) = 0; - /* This specifies if a function is globaly visible, ie. it is + /* This specifies if a function is globaly visible, i.e. it is the opposite of declaring static in C. */ if (DECL_CONTEXT (fndecl) == NULL_TREE && !sym->attr.entry_master) @@ -1057,7 +1059,7 @@ build_function_decl (gfc_symbol * sym) /* TREE_STATIC means the function body is defined here. */ TREE_STATIC (fndecl) = 1; - /* Set attributes for PURE functions. A call to PURE function in the + /* Set attributes for PURE functions. A call to a PURE function in the Fortran 95 sense is both pure and without side effects in the C sense. */ if (attr.pure || attr.elemental) @@ -1153,7 +1155,7 @@ create_function_arglist (gfc_symbol * sym) for (f = sym->formal; f; f = f->next) { - if (f->sym != NULL) /* ignore alternate returns. */ + if (f->sym != NULL) /* ignore alternate returns. */ { length = NULL_TREE; @@ -1284,22 +1286,22 @@ trans_function_start (gfc_symbol * sym) fndecl = sym->backend_decl; - /* let GCC know the current scope is this function */ + /* Let GCC know the current scope is this function. */ current_function_decl = fndecl; - /* Let the world know what e're about to do. */ + /* Let the world know what we're about to do. */ announce_function (fndecl); if (DECL_CONTEXT (fndecl) == NULL_TREE) { - /* create RTL for function declaration */ + /* Create RTL for function declaration. */ rest_of_decl_compilation (fndecl, 1, 0); } - /* create RTL for function definition */ + /* Create RTL for function definition. */ make_decl_rtl (fndecl); - /* Set the line and filename. sym->decalred_at seems to point to the + /* Set the line and filename. sym->declared_at seems to point to the last statement for subroutines, but it'll do for now. */ gfc_set_backend_locus (&sym->declared_at); @@ -1311,7 +1313,7 @@ trans_function_start (gfc_symbol * sym) not safe to try to expand expressions involving them. */ cfun->x_dont_save_pending_sizes_p = 1; - /* function.c requires a push at the start of the function */ + /* function.c requires a push at the start of the function. */ pushlevel (0); } @@ -1333,7 +1335,7 @@ build_entry_thunks (gfc_namespace * ns) /* This should always be a toplevel function. */ assert (current_function_decl == NULL_TREE); - /* Remeber the master function argument decls. */ + /* Remember the master function argument decls. */ for (formal = ns->proc_name->formal; formal; formal = formal->next) { } @@ -1351,7 +1353,7 @@ build_entry_thunks (gfc_namespace * ns) gfc_start_block (&body); - /* Pass extra parater identifying this entry point. */ + /* Pass extra parameter identifying this entry point. */ tmp = build_int_cst (gfc_array_index_type, el->id, 0); args = tree_cons (NULL_TREE, tmp, NULL_TREE); string_args = NULL_TREE; @@ -1448,7 +1450,7 @@ gfc_create_function_decl (gfc_namespace * ns) /* Create a declaration for the master function. */ build_function_decl (ns->proc_name); - /* Compile teh entry thunks. */ + /* Compile the entry thunks. */ if (ns->entries) build_entry_thunks (ns); @@ -1873,7 +1875,7 @@ gfc_trans_auto_character_variable (gfc_symbol * sym, tree fnbody) /* Generate function entry and exit code, and add it to the function body. This includes: - Allocation and initialisation of array variables. + Allocation and initialization of array variables. Allocation of character string variables. Initialization and possibly repacking of dummy arrays. */ @@ -2088,7 +2090,7 @@ generate_local_decl (gfc_symbol * sym) if (warn_unused_parameter) warning ("unused parameter `%s'", sym->name); } - /* warn for unused variables, but not if they're inside a common + /* Warn for unused variables, but not if they're inside a common block or are use_associated. */ else if (warn_unused_variable && !(sym->attr.in_common || sym->attr.use_assoc)) @@ -2239,7 +2241,7 @@ gfc_generate_function_code (gfc_namespace * ns) warning ("Function return value not set"); else { - /* Set the return value to the the dummy result variable. */ + /* Set the return value to the dummy result variable. */ tmp = build (MODIFY_EXPR, TREE_TYPE (result), DECL_RESULT (fndecl), result); tmp = build_v (RETURN_EXPR, tmp); |