diff options
| author | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-24 16:54:52 +0000 |
|---|---|---|
| committer | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-24 16:54:52 +0000 |
| commit | 377df5f3c6abf98c2771284d7769644af8779dfa (patch) | |
| tree | 7fdd0d35b429a18eb2174ff0ca3565523f181be2 /gcc/fortran/resolve.c | |
| parent | 309d3953f558e7eaab2cd93a6524f4f9cd0b095d (diff) | |
| download | ppe42-gcc-377df5f3c6abf98c2771284d7769644af8779dfa.tar.gz ppe42-gcc-377df5f3c6abf98c2771284d7769644af8779dfa.zip | |
* resolve.c (resolve_entries): Fix a bunch of comment typos.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86497 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
| -rw-r--r-- | gcc/fortran/resolve.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index dfca4abff01..31c3bf4f2cf 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -312,6 +312,10 @@ merge_argument_lists (gfc_symbol *proc, gfc_formal_arglist *new_args) /* Add a new argument. Argument order is not important. */ new_arglist = gfc_get_formal_arglist (); new_arglist->sym = new_sym; + /* We mark all arguments as optional, since in the common case + only a subset of the arguments will be present. This avoids + having to special case arguments of master functions later on. */ + new_arglist->sym->attr.optional = 1; new_arglist->next = proc->formal; proc->formal = new_arglist; } @@ -344,7 +348,7 @@ resolve_entries (gfc_namespace * ns) if (ns->proc_name->attr.entry_master) return; - /* If this isn't a procedure something as gone horribly wrong. */ + /* If this isn't a procedure something has gone horribly wrong. */ assert (ns->proc_name->attr.flavor == FL_PROCEDURE); /* Remember the current namespace. */ @@ -369,8 +373,8 @@ resolve_entries (gfc_namespace * ns) /* Create a new symbol for the master function. */ /* Give the internal function a unique name (within this file). - Also include teh function name so the user has some hope of figuring - out whats going on. */ + Also include the function name so the user has some hope of figuring + out what is going on. */ snprintf (name, GFC_MAX_SYMBOL_LEN, "master.%d.%s", master_count++, ns->proc_name->name); name[GFC_MAX_SYMBOL_LEN] = '\0'; @@ -392,10 +396,10 @@ resolve_entries (gfc_namespace * ns) for (el = ns->entries; el; el = el->next) merge_argument_lists (proc, el->sym->formal); - /* And use it for the function body. */ + /* Use the master function for the function body. */ ns->proc_name = proc; - /* FInalize the new symbols. */ + /* Finalize the new symbols. */ gfc_commit_symbols (); /* Restore the original namespace. */ |

