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: Tobias Burnus <burnus at net-b dot de>
- To: Alessandro Fanfarillo <fanfarillo dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Sun, 03 Jun 2012 15:58:20 +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>
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