https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99884

            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=gcc.git;a=blob;f=gcc/fortran/io.c;h=40cd76eb5858614c81de98b59a4f6e5b814988ea;hb=HEAD#l2494
the variable "spec" is either set to a string followed by a space, or an empty
string. This seems like a good way to be able to create a correct error message
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 "spec"
is empty.

Unless I miss something the message string should begin "%sspecifier at %L not 
…"

Reply via email to