[patch, fortran] fixes for functions

Brooks Moses brooks.moses@codesourcery.com
Mon Jul 9 18:23:00 GMT 2007


Daniel Franke wrote:
> +  /* A function shall not have an initializer.  */
> +  if (sym->attr.function && sym->value)
> +    {
> +      gfc_error ("Function '%s' at %L cannot have an inital value",
> +		 sym->name, &sym->declared_at);
> +      return FAILURE;
> +    }

That should be spelled "initial".

Personally, I'd find "cannot have an initializer" (or maybe "cannot be 
declared with an initializer") much clearer than "initial value"; if I 
got that error message, I wouldn't have any idea what counted as an 
initial value and what was wrong with it.

- Brooks



More information about the Fortran mailing list