This is the mail archive of the gcc-patches@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] |
you missed the diff, one can find it at: http://gcc.gnu.org/viewcvs/trunk/gcc/fortran/gfortran.texi?r1=121201&r2=122238&pathrev=122238&diff_format=h http://gcc.gnu.org/viewcvs/trunk/gcc/fortran/decl.c?r1=121830&r2=122238&pathrev=122238&diff_format=h
trunk/gcc/fortran/decl.c:
-/* Match an extended-f77 kind specification. */
+/* Match an extended-f77 kind specification. This assumes that the kind
+ number is equal to the byte size for non-COMPLEX types, and equal to + half of the byte size for COMPLEX. */
Well, the kind number matches the complete byte-size of the complex variable (Re+Im). I think something like:
+/* Match an extended-f77 kind specification. This assumes that the kind + number is equal to the byte size; for COMPLEX it is the total byte size + of real plus imaginary part. */
Similarily for gfortran.texi; instead of
where @code{TYPESPEC} is a basic type (@code{INTEGER}, @code{REAL}, +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.
I would prefer something like:
where @code{TYPESPEC} is a basic type (@code{INTEGER}, @code{REAL}, +etc.), and where @code{size} is a byte count corresponding to a valid +kind for that type; for the @code{COMPLEX} type the @code{size} is +byte count of real plus imaginary part. +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.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |