This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran, RFC patch] Document naming and argument passing convention
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 9 Apr 2013 12:47:11 +0300
- Subject: Re: [Fortran, RFC patch] Document naming and argument passing convention
- References: <5155E015 dot 6010600 at net-b dot de> <5155E090 dot 8020506 at net-b dot de> <CAO9iq9GMM3s+AmOtngGhFjcObhPCBK4-6YxEuUyQTSyNh5W=QQ at mail dot gmail dot com> <5157421A dot 6060707 at net-b dot de> <CAO9iq9GF5E-SY6NRDBwPPfyp3diE+FO_SQ71MbQC5CO1QzJuDA at mail dot gmail dot com> <5162D681 dot 8050007 at net-b dot de>
On Mon, Apr 8, 2013 at 5:38 PM, Tobias Burnus <burnus@net-b.de> wrote:
> Dear all,
>
> attached is an updated version of the patch, which address the raised issues
> and some minor problems and omissions I found.
>
> OK for the trunk?
+For Boolean (@code{LOGICAL}) arguments, please note that GCC expects
+only the integer value 0 and 1. If a GNU Fortran @code{LOGICAL}
+variable contains another integer value, the result is undefined.
+As some other Fortran compilers use @math{-1} for @code{.TRUE.},
+extra care has to be taken -- such as passing the value as
+@code{INTEGER}. (The same value restriction also applies to other
+front ends of GCC, e.g. to GCC's C99 compiler for @code{_Bool}
+or GCC's Ada compiler for @code{Complex}.)
Presumably you meant Ada's @code{Bool} (or whatever the Ada boolean
type is called)?
Ok with that change.
--
Janne Blomqvist