Brooks Moses - Re: [patch, fortran, committed] Document COMPLEX*k syntax quirk. (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

Brooks Moses wrote:


2007-02-22 Brooks Moses brooks.moses@codesourcery.com

-------------------------------------------------------------------

I forgot the patch; here it is.- Brooks

Index: gfortran.texi

--- gfortran.texi (revision 122237) +++ gfortran.texi (working copy) @@ -837,19 +837,21 @@ @section Old-style kind specifications @cindex Kind specifications

-GNU Fortran allows old-style kind specifications in -declarations. These look like: +GNU Fortran allows old-style kind specifications in declarations. These +look like: @smallexample

@end smallexample where @code{TYPESPEC} is a basic type (@code{INTEGER}, @code{REAL}, -etc.), and where @code{k} is a valid kind number for that type. The -statement then declares @code{x}, @code{y} and @code{z} to be of -type @code{TYPESPEC} with kind @code{k}. This is equivalent to the -standard conforming declaration +etc.), and where @code{size} is a byte count corresponding to a valid +kind for that type. The statement then declares @code{x}, @code{y} and +@code{z} to be of type @code{TYPESPEC} with the appropriate kind. This +is equivalent to the standard conforming declaration @smallexample TYPESPEC(k) x,y,z @end smallexample +where @code{k} is equal to @code{size} for most types, but is equal to +@code{size/2} for the @code{COMPLEX} type.

@node Old-style variable initialization @section Old-style variable initialization Index: decl.c

--- decl.c (revision 122237) +++ decl.c (working copy) @@ -1373,7 +1373,9 @@ }

-/* Match an extended-f77 kind specification. / +/ Match an extended-f77 kind specification. This assumes that the kind

match gfc_match_old_kind_spec (gfc_typespec *ts)


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