This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/77391] gfortran allows CHARACTER(LEN=:),PARAMETER:: STRING='constant' buts does not report it as an extension
- From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 Aug 2016 12:45:45 +0000
- Subject: [Bug fortran/77391] gfortran allows CHARACTER(LEN=:),PARAMETER:: STRING='constant' buts does not report it as an extension
- Auto-submitted: auto-generated
- References: <bug-77391-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77391
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu.org
--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
F2008 4.2
9 An asterisk as a type-param-value specifies that a length type parameter is
an assumed type parameter. It is used for a dummy argument to assume the type
parameter value from the effective argument, for an associate name in a SELECT
TYPE construct to assume the type parameter value from the corresponding
selector, and for a named constant of type character to assume the character
length from the constant-expr .
I think the last fragment clarifies that the following is the right way to do
it.
character(len=*),parameter :: ident1="@(#)one(3f): with asterisk"
and C402 excludes the use of the colon without exception
Repeating myself:
"named constant of type character to assume the character length from the
constant-expr."
Is very explicit.