This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/13939] [gfortran] Does not accept missing subroutine arguments like g77
- From: "tobi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jun 2004 12:37:38 -0000
- Subject: [Bug fortran/13939] [gfortran] Does not accept missing subroutine arguments like g77
- References: <20040131014550.13939.bdavis9659@comcast.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tobi at gcc dot gnu dot org 2004-06-02 12:37 -------
As to the precise meaning of this feature, I quote the g77 documentation:
--------------------------
The `-fugly-comma' option enables use of a single trailing comma to
mean "pass an extra trailing null argument" in a list of actual
arguments to an external procedure, and use of an empty list of
arguments to such a procedure to mean "pass a single null argument".
(Null arguments often are used in some procedure-calling schemes to
indicate omitted arguments.)
For example, `CALL FOO(,)' means "pass two null arguments", rather
than "pass one null argument". Also, `CALL BAR()' means "pass one null
argument".
This construct is considered "ugly" because it does not provide an
elegant way to pass a single null argument that is syntactically
distinct from passing no arguments. That is, this construct changes
the meaning of code that makes no use of the construct.
--------------------------
This doesn't seem to conincide with the output Bud quoted, so apparently g77
accepts those commas even with -fno-ugly-commas, passing nothing for those
omitted arguments it seems.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13939