diff options
| author | brooks <brooks@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-22 21:03:05 +0000 |
|---|---|---|
| committer | brooks <brooks@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-22 21:03:05 +0000 |
| commit | 22aed4ed8eb981f2e8c2bea17c20e373a321a2be (patch) | |
| tree | 27f1a16f222572f29ca3e13913bdf0b31a9322cb | |
| parent | 66d1b916e29ded5fd678c3fb9359af8da53a1bd7 (diff) | |
| download | ppe42-gcc-22aed4ed8eb981f2e8c2bea17c20e373a321a2be.tar.gz ppe42-gcc-22aed4ed8eb981f2e8c2bea17c20e373a321a2be.zip | |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122238 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/fortran/decl.c | 4 | ||||
| -rw-r--r-- | gcc/fortran/gfortran.texi | 16 |
3 files changed, 19 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index cea7f13ec00..d6f0b271faa 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +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. + 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org> * parse.c (next_free): Gooble spaces after OpenMP sentinel. diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 8165c79d674..aaa11572ade 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1373,7 +1373,9 @@ cleanup: } -/* 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. */ match gfc_match_old_kind_spec (gfc_typespec *ts) diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 08fa011d55b..62889bd600e 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -837,19 +837,21 @@ of extensions, and @option{-std=legacy} allows both without warning. @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 - TYPESPEC*k x,y,z + TYPESPEC*size x,y,z @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 |

