This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/77391] gfortran allows CHARACTER(LEN=:),PARAMETER:: STRING='constant' buts does not report it as an extension


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]