public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "domob at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/39171] New: Misleading warning for negative character length Date: Thu, 12 Feb 2009 18:19:00 -0000 [thread overview] Message-ID: <bug-39171-16338@http.gcc.gnu.org/bugzilla/> (raw) When compiling code with a zero character-length like this: character(len=0) :: str end gfortran gives no error/warning. But for a negative length: character(len=-1) :: str end one gets the misleading message: character(len=-1) :: str 1 Warning: CHARACTER variable has zero length at (1) The correct behaviour is to adjust the negative length to zero; zero itself is fine. Dominique suggested to print this warning instead: Warning: CHARACTER variable xxx has a negative length, the length has been set to zero And instead of always printing this warning, one could make it dependend on some -W flag. -- Summary: Misleading warning for negative character length Product: gcc Version: unknown Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: domob at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39171
next reply other threads:[~2009-02-12 18:19 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-02-12 18:19 domob at gcc dot gnu dot org [this message] 2009-02-13 10:34 ` [Bug fortran/39171] " burnus at gcc dot gnu dot org 2009-02-19 5:56 ` pault at gcc dot gnu dot org 2009-12-27 9:35 ` domob at gcc dot gnu dot org 2010-02-09 10:44 ` domob at gcc dot gnu dot org 2010-02-09 10:45 ` domob at gcc dot gnu dot org 2010-02-23 16:39 ` hjl dot tools at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-39171-16338@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).