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

            Bug ID: 126974
           Summary: truncating caret output when COLUMNS lower than
                    diagnostic length regardless of flags
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: diagnostics
          Assignee: dmalcolm at redhat dot com
          Reporter: waffl3x at gcc dot gnu.org
  Target Milestone: ---

Created attachment 65379
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65379&action=edit
Output with various values of COLUMNS

The line with the error ends before column 90, and the diagnostic at its
longest ends before column 100. (I believe that makes them 89 and 99
columns wide but I'm being precise in case I've got it wrong somehow.)

COLUMNS=98 does not truncate the output.
COLUMNS=97 truncates the output by 1 character

The result is not changed by -fmessage-length=0.

```
int f(int
*ASTARTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
int *b)
{
  return
ASTARTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
b;
}
```

Reply via email to