This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33539] Too much noise for zero-length character strings
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2007 18:51:15 -0000
- Subject: [Bug fortran/33539] Too much noise for zero-length character strings
- References: <bug-33539-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from tkoenig at gcc dot gnu dot org 2007-10-03 18:51 -------
This may work:
$ svn diff
Index: resolve.c
===================================================================
--- resolve.c (revision 128885)
+++ resolve.c (working copy)
@@ -6563,7 +6563,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);
(I do want a warning for a length that's less than zero, but
exactly zero seems to be OK).
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu dot
| |org
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33539