[patch, fortran, committed] Document COMPLEX*k syntax quirk.
Brooks Moses
brooks.moses@codesourcery.com
Thu Feb 22 21:16:00 GMT 2007
The attached patch documents the fact that "COMPLEX*k x" declares x to
be of kind k/2, not of kind k. The only rational way to explain this is
to say that in a "TYPESPEC*k" declaration, the "k" is a byte size rather
than a kind number -- which is, after all, the usual interpretation of
that syntax anyway.
I also added a comment to the relevant function in decl.c, noting that
it assumes a correspondence between byte sizes and kind numbers.
-------------------------------------------------------------------
2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
* gfortran.texi (Old-style kind specifications): Document
special handling of old-style kind specifiers for COMPLEX.
* decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
assumptions in comment.
-------------------------------------------------------------------
The documentation changes were tested with "make pdf" and "make info" on
i686-pc-linux-gnu. Committed to trunk and 4.2, under a blanket approval
from Steve Kargl on the texi changes, and as obvious for the decl.c comment.
- Brooks
More information about the Fortran
mailing list