This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran, patch] PR 48831 - Constant expression (PARAMETER array element) rejected as nonconstant
- From: Alessandro Fanfarillo <fanfarillo dot gcc at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Sun, 3 Jun 2012 16:58:43 +0200
- Subject: Re: [Fortran, patch] PR 48831 - Constant expression (PARAMETER array element) rejected as nonconstant
- References: <CAHqFgjWrpjmxH-kYht=rJzK4LsoNqy-dqh-mysX3VFOn8Cu6Ew@mail.gmail.com> <4FB8C328.9070206@net-b.de> <CAHqFgjVYvGsktb28-Y8ah6nLHWQ5Esjha9QczmyYB81CWCtOBA@mail.gmail.com> <4FCB6D7C.5090702@net-b.de>
Thank you Tobias, I thought that "Change name in gfc_check_init_expr"
was sufficient.
2012/6/3 Tobias Burnus <burnus@net-b.de>:
> Hi Alessandro, hi all,
>
>
> Alessandro Fanfarillo wrote:
>>
>> in attachment the patch which includes the review comments provided by
>> Tobias.
>
>
> Thanks for the patch, which I committed as Rev. 188152. Congratulation to
> your second committed patch.
>
> Nit: You forgot twice to add the prefix "gfc_" in the ChangeLog; I corrected
> it before committal.
>
> ?* * *
>
> If possible, use "-p" when you do a diff. With svn, simply pass "-x -p" (or
> --diff-cmd=diff -x '-p -u'); git does this already by default. [Some prefer
> "-c" to "-u", which is also fine.] ?Without the "-p" flag, the result is:
>
> --- gcc/fortran/check.c (revisione 188147)
> +++ gcc/fortran/check.c
> @@ -163,7 +163,7 @@
> ? if (scalar_check (k, n) == FAILURE)
>
>
> While with "-p" flag, one gets:
>
> --- gcc/fortran/check.c ? ?(Revision 188123)
> +++ gcc/fortran/check.c
> @@ -163,7 +163,7 @@ kind_check (gfc_expr *k, int n, bt type)
> ? if (scalar_check (k, n) == FAILURE)
>
>
> The difference is that the @@ line shows the function name (here:
> "kind_check"). That information makes it easier to review a patch as one
> then knows more about the context.
>
> Tobias