aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2007-10-04 20:26:24 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2007-10-04 20:26:24 +0000
commit815cd40643f4007299927c480145ba81528edc26 (patch)
tree5c4da28c82571183db8296f69b54b10292eec205 /gcc/fortran/resolve.c
parent789e4e2825e4f1c0d4221ebe6d5468e2b2f7c7fb (diff)
downloadgcc-815cd40643f4007299927c480145ba81528edc26.zip
gcc-815cd40643f4007299927c480145ba81528edc26.tar.gz
gcc-815cd40643f4007299927c480145ba81528edc26.tar.bz2
re PR fortran/33539 (Too much noise for zero-length character strings)
2007-10-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/33539 * resolve.c: Only warn if the string length is less than zero. 2007-10-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/33539 * zero_length_2.f90: Omit warning for zero-length string. * repeat_2.f90: Likewise. * repeat_4.f90: Likewise. * char_length_2.f90: Likewise. From-SVN: r129022
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 82c990d..536b3c5 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -6558,7 +6558,7 @@ resolve_charlen (gfc_charlen *cl)
/* "If the character length parameter value evaluates to a negative
value, the length of character entities declared is zero." */
- if (cl->length && !gfc_extract_int (cl->length, &i) && i <= 0)
+ if (cl->length && !gfc_extract_int (cl->length, &i) && i < 0)
{
gfc_warning_now ("CHARACTER variable has zero length at %L",
&cl->length->where);