From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C7CDD3854819; Fri, 2 Apr 2021 17:55:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7CDD3854819 From: "goeran at uddeborg dot se" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99884] New: Double spaces in warning message Date: Fri, 02 Apr 2021 17:55:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: goeran at uddeborg dot se X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 17:55:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99884 Bug ID: 99884 Summary: Double spaces in warning message Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: goeran at uddeborg dot se Target Milestone: --- At https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblob;f=3Dgcc/fortran/io.c;h=3D40cd= 76eb5858614c81de98b59a4f6e5b814988ea;hb=3DHEAD#l2494 the variable "spec" is either set to a string followed by a space, or an em= pty string. This seems like a good way to be able to create a correct error mes= sage when there is a valid string to print but avoid an extra space when not. But when actually used in a message a few lines below, this feature is not taken advantage of, and the specifier is followed by a space regardless. That will make two spaces if there is a valid string, and one useless space when "spe= c" is empty. Unless I miss something the message string should begin "%sspecifier at %L = not=20 =E2=80=A6"=